Results 1 to 2 of 2

Thread: help please

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2004
    Posts
    26

    help please

    this is the error i get
    An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll

    Additional information: System error.

    the code is


    Private Sub log_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles log.Click
    Dim strCommandText As String = "SELECT COUNT(*) as USRMATCH FROM USER WHERE " & _
    "USERNAME = '" & Me.user.Text & "' AND PASSWORD = '" & Me.pass.Text & "'"

    Dim sqlconn As New SqlConnection _
    ("data source = localhost; initial catalog=ICS; user ID=sa;password=xxx")
    sqlconn.Open()

  2. #2
    New Member
    Join Date
    Apr 2004
    Posts
    10
    Put your code in a try catch ex as system.data.sqlclien.sqlexception statement. The error will be explained there.

    Thanks
    Josh

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width