String Length Limitation for SQLConfigDataSource()



Hi,

I'm trying to create a data source for a Microsoft Access data base
file using the SQLConfigDataSource() call in a MFC application.

BOOL SQLConfigDataSource(HWND hwndParent,UINT fRequest, LPCSTR
lpszDriver, LPCSTR lpszAttributes);

The problem I run in to is that if the path to the database file in
the lpszAttributes string is too long the data source will fail to
connect to the database file later when I call OpenEx(). The
limitation seems to be somewhere between 200 and 300 characters.

Is there a way around this problem? I would like to specify a longer
path to the database file.

Thanks for your help,
Kjell Uddeborg


PS
The attribute in the lpszAttributes string that I use to specify the
data base file is "DBQ=[Path to data base file]"
.



Relevant Pages

  • Re: Repost of an old question. Can not use Access in VS2005
    ... The Microsoft page "How to: Connect to Data in an Access Database "http://msdn2.microsoft.com/en-us/library/cf131f6b.aspx states the following on how to connect to a Access database: ... Select Database on the Choose a Data Source Type page. ... Select New Connection to create a new data connection. ... Note If the Data source is not Microsoft Access Database File, then select Change to open the Choose/Change Data Source dialog box, select Microsoft Access Database File, and then click Continue. ...
    (microsoft.public.vsnet.general)
  • Re: Use FileMaker data as source for PivotTable xl2004
    ... When I try to create a Pivottable using my FMP database as the source, I can see the database file in the dialog box, but it's grayed out so I can't proceed with the PivotTable. ... Excel launches the iODBC Data Source Chooser and displays my one entry in the System Data Sources list (I?ve also tried doing this whole setup using a User DSN, and I get the same result). ...
    (microsoft.public.mac.office.excel)
  • Re: Repost of an old question. Can not use Access in VS2005
    ... Connect to Data in an Access Database ... Select Database on the Choose a Data Source Type page. ... Select New Connection to create a new data connection. ... Access Database File, and then click Continue. ...
    (microsoft.public.vsnet.general)
  • Repost of an old question. Can not use Access in VS2005
    ... Connect to Data in an Access Database ... Select Database on the Choose a Data Source Type page. ... Select New Connection to create a new data connection. ... Access Database File, and then click Continue. ...
    (microsoft.public.vsnet.general)
  • Re: Text file data source problem. Not recognizing tabs.
    ... The default expectation of the OLE DB text driver is /probably/ set ... An additional note is that if I open the data source as a Text File (instead ... OLE DB Database File method). ... Fname, Lname, and address), it sees a single field named ...
    (microsoft.public.word.mailmerge.fields)