hello all
I am new to sql server ,I got a problem when trying to connect adodc control to sql server 7 ,when trying to apply any filter critria I got the results repeated in many rows.
my simple application contains of
-Form
-Adodc control
-Datagrid control
-button
Code
Private Sub Form_Load()
Adodc1.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=data;Data Source=server"
Adodc1.RecordSource = "select id,name from employee"
Adodc1.Refresh
End Sub
Private Sub Command1_Click()
Adodc1.RecordSource = "SELECT id,name from employee where name='John'"
Adodc1.Refresh
End Sub
the problem is when pressing command1 I got in datagrid tow rows and the tow rows indicating to same record
please help
thanks in advance
I am new to sql server ,I got a problem when trying to connect adodc control to sql server 7 ,when trying to apply any filter critria I got the results repeated in many rows.
my simple application contains of
-Form
-Adodc control
-Datagrid control
-button
Code
Private Sub Form_Load()
Adodc1.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=data;Data Source=server"
Adodc1.RecordSource = "select id,name from employee"
Adodc1.Refresh
End Sub
Private Sub Command1_Click()
Adodc1.RecordSource = "SELECT id,name from employee where name='John'"
Adodc1.Refresh
End Sub
the problem is when pressing command1 I got in datagrid tow rows and the tow rows indicating to same record
please help
thanks in advance