shayne23d
asked on
create new records using adodb and sql
Another newbie question.
I am using ADODB.Connection and ADODB.Recordset withMicrosoft SQL
Lets say I have two tables, one company and one employee and they are related.
What call do I make to ADODB to create a new record in the two tables. How does the primary key get placed into the foreign key of the child table?
Dim comp as string
Dim emp as string
Comp = “Albertsons”
Emp = “shayne”
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Set cn = New ADODB.Connection
set rs = New ADODB.Recordset
cn.Open '"Provider=SQLOLEDB.1;Inte grated Security=SSPI;Persist Security Info=False;Initial Catalog=test;Data Source=DURGA"
cn.Open
now I do not know what to do
Thanks in advance
shayne
I am using ADODB.Connection and ADODB.Recordset withMicrosoft SQL
Lets say I have two tables, one company and one employee and they are related.
What call do I make to ADODB to create a new record in the two tables. How does the primary key get placed into the foreign key of the child table?
Dim comp as string
Dim emp as string
Comp = “Albertsons”
Emp = “shayne”
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Set cn = New ADODB.Connection
set rs = New ADODB.Recordset
cn.Open '"Provider=SQLOLEDB.1;Inte
cn.Open
now I do not know what to do
Thanks in advance
shayne
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you