Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exporting data in MSACCESS
Message
From
19/03/2007 14:03:16
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01192149
Message ID:
01205660
Views:
18
>>>Here's you suggested code:
>>>
lnConnHandle = SQLSTRINGCONNECT('Driver={Microsoft Access Driver (*.mdb)};Dbq="'+
>>>	lcMDBDir+'\'+lcMDBName+'";Uid=Admin;Pwd=;')
>>>
>>>
>>>Here's what I typed in and I think they are the same, but it returned a -1 value. It did get further through the program but I should have tested for a -1 return value and stopped the program at that point. I'll do that.
>>>
>>>
>>>lnConnHandle = SQLSTRINGCONNECT('Driver={Microsoft Access Driver (*.mdb)};Dbq="'+
>>>	lcMDBDir+'\'+lcMDBName+'";Uid=Admin;Pwd=;')
>>>
>>
>>Let's try a clean one...
>>
>>
lcFullPath=forcepath(lcMDBName, lcMDBDir)
>>cString=textmerge("Driver={Microsoft Access Driver (*.mdb)};Dbq=<<lcFullPath>>;Uid=Admin;Pwd=;"
>>lnConnHandle=sqlstringconnect(cString)
>>if lnConnHandle<1
>>   aerror(ee)
>>   messagebox(ee[2])
>>endif
>
>How about double quotes around the path? The original problem was related to a space in the path.

In that case
lcFullPath=forcepath(lcMDBName, lcMDBDir)
cString=textmerge([Driver={Microsoft Access Driver (*.mdb)};Dbq="<<lcFullPath>>";Uid=Admin;Pwd=;]
lnConnHandle=sqlstringconnect(cString)
if lnConnHandle<1
   aerror(ee)
   messagebox(ee[2])
endif

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform