Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 To: Kevin
  Where is Kevin?
 edwardsville
 Illinois - United States
 Kevin
 Tags
Subject: RE: Send password to access
Thread ID: 289148 Message ID: 289202 # Views: 34 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: ODBC, ADO and OLEDB
Date: Wednesday, December 29, 2010 1:30:51 PM         
   


> Thanks that helped
>
> I came up with this
>
>
Store Sqlstringconnect(;
> 	'DBQ='+Alltrim(Paths.integra)+';'+;
> 	'DefaultDir=c:\;'+;
> 	'Driver={Microsoft Access Driver (*.mdb)}; Uid=Admin; Pwd='+Alltrim(Paths.pwd));
> 	TO lncon

>
> Now I need to get info from the table that has a field with a space in the field name
>
> This works on a field with no spaces
>
>
test =SQLExec(lnCon, 'SELECT distinct * FROM "Products" where "Picture" = ?fm', [productcursor])

>
> but this will not work on a field that has a space in the field
>
>
test =SQLExec(lnCon, 'SELECT distinct * FROM "Products" where "Product Number" = ?fm', [productcursor])

>


Interesting, in a short test, your last line seems to work well with a 2007 accdb as well as with an 2003 test.MDB here.
If yours does not, do square brackets work better than double quotes inside the string you are sending to the "server"?

test =SQLExec(lnCon, 'SELECT distinct * FROM [Products] where [Product Number] = ?fm', [productcursor])





hth
-Stefan

ENTIRE THREAD

Send password to access Posted by Kevin @ 12/28/2010 6:29:57 PM
RE: Send password to access Posted by Stefan Wuebbe @ 12/28/2010 6:46:07 PM
RE: Send password to access Posted by Kevin @ 12/29/2010 12:18:20 AM
RE: Send password to access Posted by Stefan Wuebbe @ 12/29/2010 1:30:51 PM
RE: Send password to access Posted by Kevin @ 12/29/2010 4:33:58 PM