|
-
May 10th, 2001, 10:40 AM
#1
Access
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??
-
May 10th, 2001, 11:14 AM
#2
Re: Access
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]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|