Dear all,
I,m doing a application in v.b 6.0 and can anyone solve my issue plz tell me how to retrive the two tables in a same time with one commonfield
Pinvoice1(Table1) Pinvoice2(Table2)
............... .................
InvNo Primary key InvNo foreign key refrence Pinvoice(InvNo)
SupId int ItemNo int
Supname varchar(20) Descrp varchar(20)
Pdate datetime Price float
Qty int
Gross
(i made it to avoid the repeated value of SupId,Supname,Pdate)
i need the out put when i type the invoice number in a textbox the first table datas in textboxes and the second table datas in a datagrid
so i used 2 Adodc control and in one control i specify the table name
in 1st adodc control Recordsource adcmdText i used this query
select ItemNo,Descrp,Rate,Qty,Gross from Pinvoice where
InvNo=& and drag a datagrid and given the datasource as adodc1
but when i tried to run my form it showed me error msg
"Incorrect syntex near&" as well page loading & close
Then i draged a button and textbox in the button click event i used this query
Dim sqlstring
sqlstring = "select ItemNo,Descrp,Rate,Qty,Gross from Pinvoice where InvNo=& txtTest.Text"
Adodc2.RecordSource = sqlstring
Adodc2.Refresh
it also showed me the error msges like
1. "Microsoft[ODBC Driver manager]datasource name not found" so i droped it.
2."Incorrect syntex near&"
3.Method 'Refresh' of object 1Adodc failed"
so what is the mistake in my coding and how to specify for parricular record