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: 289174 # Views: 33 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: ODBC, ADO and OLEDB
Date: Wednesday, December 29, 2010 12:18:20 AM         
   


> > I am connecting to an access table but it keeps poping up a 
> > request for a password. I know the password but dont want to
> > have to type it in How do I send the user name and password
> > 
> > This is how I am connecting
> > 
> > Store Sqlstringconnect(;
> > 	'DBQ='+Alltrim(Path.parts)+';'+;
> > 	'DefaultDir=c:\;'+;
> > 	'Driver={Microsoft Access Driver (*.mdb)}');
> > 	TO lncon

>
>
> Quoted from http://www.connectionstrings.com/access-2007
>
>
> Driver={Microsoft Access Driver (*.mdb, *.accdb};Dbq=C:\mydatabase.accdb;Uid=Admin;Pwd=;
> 

>
>
>
> hth
> -Stefan


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])


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