Your right - too much copying and pasting from one form to another. Thank
you.
I'm past that error now. Instead I'm having a different problem. This is
my code:
Set adoConn = New ADODB.Connection
Set adoRecord = New ADODB.Recordset
lblProgress.Caption = "Importing customer files"
'grab and import the selected files
Selected = lstFiles.ListIndex
If Selected = -1 Then
lblProgress = "YOU MUST SELECT THE FILES TO IMPORT!"
Else
For i = 0 To lstFiles.ListCount - 1
If lstFiles.Selected(i) Then
strSource = "Driver={Microsoft Visual FoxPro
Driver};SourceType=DBF;SourceDB=c:\datacnv2\" & dPath$ & "\" &
lstFiles.List(i) & ";Exclusive=No"
adoConn.Open strSource
strSQL = "SELECT * FROM " & Left(lstFiles.List(i),
Len(lstFiles.List(i)) - 4)
adoRecord.Open strSQL, adoConn
adoRecord.MoveFirst
Debug.Print lstFiles.List(i), lstFiles.ItemData(i)
End If
Next
End If
Every thing is resolving correctly, strSource has the correct path, and
strSQL is looking for the correct table, and the table does exist in the
folder. The database is an older dbf, not the newer kind that uses a dbc.
Yet I'm getting a file does not exist error. I assume that is can't read it
for some reason? Does that make sense? Or would I get a different error?
Diane
-----Original Message-----
From: Roy, Siddarth S [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 30, 2002 12:09 PM
To: [EMAIL PROTECTED]
Subject: [wdvltalk] RE: OT? Two strange vb database how to questions
dim conn as adodb.coonection
Set conn=new adodb.connnection
That is why u are getting that error
hope this helps
sid
-----Original Message-----
From: Diane Schips [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 30, 2002 11:59 AM
To: [EMAIL PROTECTED]
Subject: [wdvltalk] RE: OT? Two strange vb database how to questions
OK, I tried it, and got the following error:
Run-time error '91'
Object variable or With block variable not set.
I'm not running this in any With block. Any ideas as to what the problem
is?
Diane
____ * The WDVL Discussion List from WDVL.COM * ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED]
Send Your Posts To: [EMAIL PROTECTED]
To change subscription settings to the wdvltalk digest version:
http://wdvl.internet.com/WDVL/Forum/#sub
________________ http://www.wdvl.com _______________________
You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
To unsubscribe send a blank email to %%email.unsub%%
____ � The WDVL Discussion List from WDVL.COM � ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED]
Send Your Posts To: [EMAIL PROTECTED]
To change subscription settings to the wdvltalk digest version:
http://wdvl.internet.com/WDVL/Forum/#sub
________________ http://www.wdvl.com _______________________
You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
To unsubscribe send a blank email to %%email.unsub%%
____ � The WDVL Discussion List from WDVL.COM � ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED]
Send Your Posts To: [EMAIL PROTECTED]
To change subscription settings to the wdvltalk digest version:
http://wdvl.internet.com/WDVL/Forum/#sub
________________ http://www.wdvl.com _______________________
You are currently subscribed to wdvltalk as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]