PDA

Click to See Complete Forum and Search --> : SQL and open text files


spandex44
Dec 10th, 1999, 01:52 AM
hi!
I've got two questions. First of all, how can I set the SQL code to a table's query during run-time? I tried using recordset but that didn't work.

Also, I am using text files to store retrieve some simple data. Sometimes when I wish to open a file, I get an error message saying that the file's already open. But when I look through my code, there's no Open command without a Close command. Any help?

------------------
Regards,
Alexander McAndrew
VB Zone
http://gsenterprise.server101.com

rino_2
Dec 10th, 1999, 03:25 AM
Are you using a different Number for each open command i.e.

Open CommonDialog1.FileName for Input As #1
'Code Here
Close #1

And

Open CommonDialog1.FileName for Input As #2
'Code Here
Close #2

I'm not sure this is right but it is worth a try. I had the same problem once but I'm not quite sure how I solved it? - Sorry

spandex44
Dec 10th, 1999, 03:41 AM
thanks, I'll give that a try. Maybe I forgot to change the numbers. Any ideas for the toher question?

------------------
Regards,
Alexander McAndrew
VB Zone
http://gsenterprise.server101.com