Click here to Skip to main content
15,914,642 members

Comments by suhan 2012 (Top 18 by date)

suhan 2012 29-Jan-13 2:24am View    
ok, thanks
suhan 2012 29-Jan-13 2:16am View    
Actually I'm getting the exception if the table is completely blank and I open that user form after log in form. But when I open it as startup form, it works.
suhan 2012 29-Jan-13 2:12am View    
Dim reg_id As Double = 0
reg_id = ds.Tables(0).Compute("Max(registrationID)", Nothing)
suhan 2012 29-Jan-13 2:03am View    
Sir, Sorry for that, actually it is my login form's code.

Actually I wanted to tell you that your code is working fine when I open that form as startup form. But when I try to open that form after logging in I'm getting the same error. "Conversion from type 'DBNull' to type 'Double' is not valid." I think there is a conflict between the login form and user form. Can you please tell me how to solve this?
suhan 2012 29-Jan-13 1:53am View    
Deleted
Public Function ask()
getconnect()
con.Open()

Dim da As New SqlDataAdapter("select * from users", con)
da.Fill(dt)
For Each DataRow In dt.Rows
If TextBox1.Text = DataRow.item(0) And TextBox2.Text = DataRow(1) Then
con.Close()
Return True


End If
Next
con.Close()
Return False
End Function