Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sql server problem

Status
Not open for further replies.

WFadloun

Programmer
Aug 18, 2003
42
AE
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top