Jump to content

Aftiii

Members
  • Posts

    2
  • Joined

  • Last visited

Profile Information

  • Location
    UK

Aftiii's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Probably not that much help Dim connect As New SqlConnection("CONNECT STRING HERE")Dim sqlTest As New SqlCommand()Dim query1 As [string] = "SELECT * FROM test WHERE user = 'testUser'"sqlTest.Connection = connectsqlTest.CommandType = System.Data.CommandType.TextsqlTest.CommandText = query1Dim sqlTestReader As SqlDataReadersqlTestReader = sqlTest.ExecuteReader()While sqlTestReader.Read() Dim result As [string] = sqlTestReader.GetString(0)End While Have you tried it without using the web config? Above I made a short query, I also defined the commandType, although I doubt this really matters. I am usually on an Oracle database but the namespace objects are really similar. Also, the code above is translated from C# to VB. Using http://converter.telerik.com/
  2. The issue you're having is here: (SELECT DATE(LOGOUT) FROM reg_att r WHERE r.EMP_NO = n.EMP_NO); That query is returning more than one row, thus the join doesn't know which row to choose. Have you tried running this query separately? SELECT DATE(*date here*)FROM reg_att rWHERE r.EMP_NO = n.EMP_NO Then you can see where you're going wrong.
×
×
  • Create New...