Qatester
May 10th, 2001, 10:40 AM
Hello! This isn't really a VB question but I thought that you guys might be able to help! I'd like to be able to insert,delete etc from an Access table but would like to embed the SQL into a batch file of sorts. Is this possible??
Iouri
May 10th, 2001, 11:14 AM
Create a text file with your SQL ( for example )
insert into T1.....
inset into T2...
delete from T3....
etc
In your VB prog read each line of this text file and execute it
Open "c:\temp\sql.txt" For Input As #1 'to read from
Do While Not EOF(1)
Line Input #1, sSQL
cn.Execute sSQL
Loop
Close #1
where cn is your Access db connection
Iouri Boutchkine
iouri@hotsheet.com