|
-
Sep 3rd, 2001, 08:27 AM
#8
Addicted Member
I guess you're using ADO. Don't know much about it but I don't think that there'll be some major diferences (this uses SQL anyway).
So, if I got that right you first check if the file exists, if no, create a new table -> if that statement works, then it is ok.
Now with the export there's a little trick. I don't think your statement would work. You should create something like:
SELECT (fields) INTO [TypeOfDatabase; DATABASE=Path].[FlName] FROM Table;
So in your example something like this:
'st - string
'This just gets the Path. Didn't test it but should work
st=Left$(CommonDialog1.FileName, _
(Instr(CommonDialog1.FileName, CommonDialog1.FileTitle)-2)
Conn.Execute "SELECT TableName.LogNo, ...Duration, ...Time_s, ...Value_s INTO [Text; DATABASE=" & st & "].[" & sFName &"] FROM TableName;"
I don't know about INSERT INTO. Should work that way too.
Especialy pay attention to the Schema.ini file if you want specific output (e.g. delimiter etc.).
post back if not clear.
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
|