0

yes. my coding as follows

 Public Function connectDB()
connStr = "Data source =KIRAN;Initial Catalog=eStaffMgm;Integrated Security=SSPI;User Id=**;Password=*******"
      connSQL = New SqlConnection(connStr)
       Return connSQL
    End Function

    My system name is Kiran and the database name is eStaffMgm
    The default instance of SQL Server 2012 is MSSQLSERVER


    The code in the module was as given above and in the Main Form Load i entered the code as follows

         'connSQL = connectDB()
        'Try
        '    connSQL.Open()
        '    daSQL = New SqlDataAdapter("select TOP 10 from BANK_DETAILS", connSQL)
        '    daSQL.Fill(dS, "BANK_DETAILS")
        '    connSQL.Close()

        'Catch ex As Exception
        '    MsgBox("error")
        '    MsgBox(ex.ToString)
        '    'connSQL.Close()
        'End Try



   Pls give me a solution for this.
3
Contributors
2
Replies
10
Views
4 Years
Discussion Span
Last Post by ryanjayson
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.