Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Kevin
  Where is Kevin?
 edwardsville
 Illinois - United States
 Kevin
 To: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 Tags
Subject: RE: Send password to access
Thread ID: 289148 Message ID: 289222 # Views: 29 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: ODBC, ADO and OLEDB
Date: Wednesday, December 29, 2010 4:33:58 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

OK this is strange when I go into access the field I wnated was Product Number but it was returning to vfp with a Product_Id so I ended up with this


test =SQLExec(lnCon, 'SELECT distinct * FROM "products" where "Product_Id" = ?fm', [productcursor])



Thanks for the help!

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