Click here to Skip to main content
15,895,746 members
Home / Discussions / ASP.NET
   

ASP.NET

 
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 
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 
N a v a n e e t h wrote:
sathimailin1 wrote:
Dim ConnectionString As SqlClient.SqlConnection = New SqlClient.SqlConnection(ConfigurationSettings.AppSettings("BBM_CONSTR"))



This connection you can create inside the DAL. in the constructor. You can write overloaded constructor which takes the connection string value also as parameter. Then if in next project, you are planning to change BBM_CONSTR, it won't be a problem.



In DAL
<br />
<br />
 Public Overloads Sub NitemDAL()<br />
        Dim ConnectionString As SqlClient.SqlConnection = New SqlClient.SqlConnection(ConfigurationSettings.AppSettings("BBM_CONSTR"))<br />
    End Sub<br />
    Public Overloads Sub NitemDAL(ByVal ConnString As String)<br />
        Dim ConnectionString As SqlClient.SqlConnection = New SqlClient.SqlConnection(ConfigurationSettings.AppSettings(ConnString))<br />
    End Sub<br />



sorry to disturb you is this the way i created constructor but i am getting stuck that how to use this in this situation


<br />
 Public Function GetDataSet(ByVal Qry As String, ByVal ConnString As SqlClient.SqlConnection, ByVal ParamArray SqlParams() As SqlClient.SqlParameter) As DataSet<br />
        Dim cmd As New SqlClient.SqlCommand<br />
        Dim sqladpt As New SqlClient.SqlDataAdapter<br />
        Dim ds As New DataSet<br />
        ConnString.Open()<br />
        cmd.Connection = ConnString<br />
        cmd.CommandText = Qry<br />
        cmd.CommandType = CommandType.StoredProcedure<br />
<br />
        Try<br />
            Attach(cmd, SqlParams)<br />
            sqladpt.SelectCommand = cmd<br />
            sqladpt.Fill(ds)<br />
            cmd.ExecuteNonQuery()<br />
        Catch ex As Exception<br />
            ex.Message.ToString()<br />
        Finally<br />
            ConnString.Close()<br />
            ConnString.Dispose()<br />
        End Try<br />
<br />
        If ds.Tables(0).Rows.Count > 0 Then<br />
            Return ds<br />
        End If<br />
    End Function<br />

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 
GeneralRe: TextBox Multiline Mode is not working in Content Placeholder ****** Pin
Thavika31-Oct-07 18:16
Thavika31-Oct-07 18:16 
Questionpayment gateway Pin
ajau28-Oct-07 19:10
ajau28-Oct-07 19:10 
AnswerRe: payment gateway Pin
N a v a n e e t h28-Oct-07 19:23
N a v a n e e t h28-Oct-07 19:23 
AnswerRe: payment gateway Pin
John-ph28-Oct-07 20:24
John-ph28-Oct-07 20:24 
QuestionAuthentication and Autherisation Pin
julius.masilamani28-Oct-07 18:51
julius.masilamani28-Oct-07 18:51 

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.