Click here to Skip to main content
15,884,628 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Mail sending problem Pin
Ghazi H. Wadi28-Oct-07 21:07
Ghazi H. Wadi28-Oct-07 21:07 
GeneralRe: Mail sending problem Pin
Lijo Rajan28-Oct-07 21:20
Lijo Rajan28-Oct-07 21:20 
GeneralRe: Mail sending problem Pin
Braulio Dez29-Oct-07 4:26
Braulio Dez29-Oct-07 4:26 
GeneralRe: Mail sending problem Pin
Ghazi H. Wadi29-Oct-07 10:43
Ghazi H. Wadi29-Oct-07 10:43 
QuestionRegarding Layers Pin
Satish_S28-Oct-07 19:53
Satish_S28-Oct-07 19:53 
AnswerRe: Regarding Layers Pin
N a v a n e e t h28-Oct-07 20:21
N a v a n e e t h28-Oct-07 20:21 
GeneralRe: Regarding Layers Pin
Satish_S28-Oct-07 20:41
Satish_S28-Oct-07 20:41 
GeneralRe: Regarding Layers Pin
N a v a n e e t h28-Oct-07 20:56
N a v a n e e t h28-Oct-07 20:56 
sathimailin1 wrote:
is This Correct?


There is no correct or wrong, these all are the patterns for designing. So as I said in my previous post regarding generalizing the DAL, depends on that what you have changed is wrong.

sathimailin1 wrote:
Public Function Getrecord(ByVal groupid As Integer, ByVal Qry As String) As DataSet


Change this to GetDataSet()(it can be anything, it's my suggestion) with a SQLCommand array and a query as parameters. So you can use this function in all your projects.

sathimailin1 wrote:
Dim oMyConn As SqlConnection = New SqlConnection(ConfigurationSettings.AppSettings("BBM_CONSTR"))


Initialize your connection in the DAL constructor, and in your function open it , do the operation and close it. Dispose this object when your DAL gets disposed.

sathimailin1 wrote:
oMyCommand.Parameters.Add("@groupid", SqlDbType.Int).Value = groupid


as you are getting parameters in an array, iterate through that and add each array item to the parameter list.

sathimailin1 wrote:
CommandType.StoredProcedure


If your project is using stored procedures and dynamic written queries, CommandType also can be a parameter to the above function. Rewriting such a way will make your DAL reusable.

sathimailin1 wrote:
Public Function Getrecords() As DataSet
Dim nn As New NitemDAL
Return nn.Getrecord(Group, "BBsearch")
End Function


In this function create SQLParameter array and pass that along with the query to the DAL. DAL should only execute the database statements. All other procedures has to be done on business layer.

Hope this helps


GeneralRe: Regarding Layers Pin
Satish_S28-Oct-07 21:09
Satish_S28-Oct-07 21:09 
GeneralRe: Regarding Layers Pin
N a v a n e e t h28-Oct-07 21:12
N a v a n e e t h28-Oct-07 21:12 
GeneralRe: Regarding Layers Pin
Satish_S29-Oct-07 2:26
Satish_S29-Oct-07 2:26 
GeneralRe: Regarding Layers Pin
N a v a n e e t h29-Oct-07 18:31
N a v a n e e t h29-Oct-07 18:31 
GeneralRe: Regarding Layers Pin
Satish_S29-Oct-07 20:53
Satish_S29-Oct-07 20:53 
GeneralRe: Regarding Layers Pin
N a v a n e e t h29-Oct-07 22:24
N a v a n e e t h29-Oct-07 22:24 
GeneralRe: Regarding Layers Pin
Satish_S30-Oct-07 21:18
Satish_S30-Oct-07 21:18 
QuestionHow to add Button click event?? Pin
varshavmane28-Oct-07 19:35
varshavmane28-Oct-07 19:35 
AnswerRe: How to add Button click event?? Pin
N a v a n e e t h28-Oct-07 19:44
N a v a n e e t h28-Oct-07 19:44 
GeneralRe: How to add Button click event?? Pin
varshavmane28-Oct-07 20:06
varshavmane28-Oct-07 20:06 
GeneralRe: How to add Button click event?? Pin
N a v a n e e t h28-Oct-07 20:24
N a v a n e e t h28-Oct-07 20:24 
AnswerRe: How to add Button click event?? Pin
soni uma28-Oct-07 19:46
soni uma28-Oct-07 19:46 
QuestionTextBox Multiline Mode is not working in Content Placeholder ****** Pin
VenkataRamana.Gali28-Oct-07 19:30
VenkataRamana.Gali28-Oct-07 19:30 
AnswerRe: TextBox Multiline Mode is not working in Content Placeholder ****** Pin
soni uma28-Oct-07 19:55
soni uma28-Oct-07 19:55 
GeneralRe: TextBox Multiline Mode is not working in Content Placeholder ****** Pin
VenkataRamana.Gali28-Oct-07 20:26
VenkataRamana.Gali28-Oct-07 20:26 
GeneralRe: TextBox Multiline Mode is not working in Content Placeholder ****** Pin
soni uma28-Oct-07 20:34
soni uma28-Oct-07 20:34 
AnswerRe: TextBox Multiline Mode is not working in Content Placeholder ****** Pin
ShruthiLavan28-Oct-07 20:00
ShruthiLavan28-Oct-07 20:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.