Click here to Skip to main content
16,005,181 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: DataGridView checkbox column problem Pin
paukiPkk30-May-07 5:12
paukiPkk30-May-07 5:12 
QuestionMS-Access Database Pin
Sonia Gupta29-May-07 18:32
Sonia Gupta29-May-07 18:32 
AnswerRe: MS-Access Database Pin
Christian Graus29-May-07 18:36
protectorChristian Graus29-May-07 18:36 
GeneralRe: MS-Access Database Pin
Sonia Gupta29-May-07 19:01
Sonia Gupta29-May-07 19:01 
GeneralRe: MS-Access Database Pin
Dave Sexton29-May-07 22:07
Dave Sexton29-May-07 22:07 
Questionhow get columns value from listview [modified] Pin
carsell29-May-07 18:30
carsell29-May-07 18:30 
AnswerRe: how get columns value from listview Pin
Sonia Gupta29-May-07 18:35
Sonia Gupta29-May-07 18:35 
Questiontrouble with login Pin
Hakmeh Mohannad29-May-07 13:09
Hakmeh Mohannad29-May-07 13:09 
Hi I am working on login form using VB 2005 and sql 2000 i made 2 text boxes and 2 buttons
on click on ok button it will cal the follwing function

EmployeeCode = txtEmployeeCode.Text
EmployeePassword = txtEmployeePassword.Text
ConnectionString = "Data Source=HAKMEH;Initial Catalog=HMS;Integrated Security=True"
Login(ConnectionString, EmployeeCode, EmployeePassword)

THE FUNCTION IS :

Public Sub Login(ByVal ConnectionString As String, ByVal EmployeeCode As String, ByVal EmployeePassword As String)
Dim ds As New DataSet
ds.Clear()
Dim MyConnection As New SqlConnection(ConnectionString)
Dim SelectQuery As String = "Select EmployeeCode,EmployeePassword from tblEmployees where EmployeeCode = ('" & txtEmployeeCode.Text & "') and EmployeePassword = ('" &_ txtEmployeePassword.Text & "')"
Dim adapter As New SqlClient.SqlDataAdapter
Dim MyCommand As New SqlCommand(SelectQuery, MyConnection)
MyConnection.Open()
Dim Command As String = MyCommand.ExecuteNonQuery
**** adapter.Fill(ds, "tblEmployees") ****
Dim dt As DataTable = ds.Tables(0)
If dt.Rows.Count <> 0 Then
frmAdministrator.Show()
Else
MsgBox("You are not Authorized to access")
End If
MyConnection.Close()
End Sub

when it comes to the line with stars it gave me the follwoing message

The SelectCommand property has not been initialized before calling 'Fill'.

so where is the error

Final Fantasy Maniac
AnswerRe: trouble with login Pin
Christian Graus29-May-07 13:44
protectorChristian Graus29-May-07 13:44 
GeneralRe: trouble with login Pin
Hakmeh Mohannad29-May-07 14:02
Hakmeh Mohannad29-May-07 14:02 
GeneralRe: trouble with login Pin
Christian Graus29-May-07 14:30
protectorChristian Graus29-May-07 14:30 
GeneralRe: trouble with login Pin
Paul Conrad29-May-07 17:03
professionalPaul Conrad29-May-07 17:03 
GeneralRe: trouble with login Pin
Christian Graus29-May-07 18:32
protectorChristian Graus29-May-07 18:32 
GeneralRe: trouble with login Pin
Paul Conrad29-May-07 17:05
professionalPaul Conrad29-May-07 17:05 
AnswerRe: trouble with login [modified] Pin
Dave Kreskowiak29-May-07 14:19
mveDave Kreskowiak29-May-07 14:19 
GeneralRe: trouble with login Pin
Colin Angus Mackay29-May-07 21:48
Colin Angus Mackay29-May-07 21:48 
GeneralRe: trouble with login Pin
Dave Kreskowiak30-May-07 3:05
mveDave Kreskowiak30-May-07 3:05 
GeneralRe: trouble with login Pin
Colin Angus Mackay30-May-07 6:38
Colin Angus Mackay30-May-07 6:38 
GeneralRe: trouble with login Pin
Dave Kreskowiak30-May-07 7:51
mveDave Kreskowiak30-May-07 7:51 
GeneralRe: trouble with login Pin
Colin Angus Mackay30-May-07 8:13
Colin Angus Mackay30-May-07 8:13 
QuestionHow to pass a string from a vb.net dll to C++ dll Pin
retZ29-May-07 9:24
retZ29-May-07 9:24 
AnswerRe: How to pass a string from a vb.net dll to C++ dll Pin
Dave Kreskowiak29-May-07 9:49
mveDave Kreskowiak29-May-07 9:49 
GeneralRe: How to pass a string from a vb.net dll to C++ dll Pin
retZ29-May-07 11:28
retZ29-May-07 11:28 
QuestionDataSet auto increment problem Pin
Quecumber25629-May-07 7:54
Quecumber25629-May-07 7:54 
AnswerRe: DataSet auto increment problem Pin
Dave Kreskowiak29-May-07 8:22
mveDave Kreskowiak29-May-07 8:22 

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.