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??
Printable View
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??
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
[email protected]