--
Regards,
Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
"Pony_Boys" wrote:
> How do handle the odbc connection string if the file name or path has a
> semicolon (;) in it.
>
> Example: C:\Test;1\fil;et.mdb
>
> Tried putting quotes around theDBQ="C:\Test;1\fil;et.mdb" but this did not
> work.
I was hopping that ODBC had a solution to this issue.
Dim myDBQ As String
myDBQ = "C:\Test" & ";" & "1\fil" & ";" & "et.mdb"
MsgBox myDBQ
--
Regards,
Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
"Pony_Boys" wrote:
> As part of my application, I ask the user to select a MDB file that they
> have
> created.
>
> The end user of my application has created a path with (;) in it.
>
> The connection string will not work with (;) in the path to the MDB file.
http://msdn.microsoft.com/en-us/library/ms722656(VS.85).aspx
In your case, you can use a "brace character" to enclose the attribute
value. For example,
DBQ={C:\Test;1\fil;et.mdb}
Please be reminded that you have to use escape sequence if there is a
closing brace inside the filename, for example,
DBQ={C:\Test;1\fil}}et.mdb}
This represents the file:
C:\Test;1\fil}et.mdb
==================================================
For more information about connection string, you can refer to the page:
http://msdn.microsoft.com/en-us/library/ms715433(VS.85).aspx
For a normative reference, you can see:
[MS-ODBCSTR] http://msdn.microsoft.com/en-us/library/cc678149(SQL.90).aspx
Thanks,
Ming.
WDAC Team, Microsoft.
P.S. We recommend customers to use the forum to ask questions in the future,
where you can obtain a faster response (Forum is at:
http://social.msdn.microsoft.com/forums/en-US/sqldataaccess/threads/)
--
Regards,
Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
--
Regards,
Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
"Pak-Ming Cheung - MSFT" wrote:
> Yes, as in my original reply, it is documented at MSDN:
> http://msdn.microsoft.com/en-us/library/ms715433(VS.85).aspx
>
> Also a normative reference is also available:
Also a normative reference is also available:
[MS-ODBCSTR] http://msdn.microsoft.com/en-us/library/cc678149(SQL.90).aspx
Thanks,
Ming.
WDAC Team, Microsoft.
P.S. We recommend customers to use the forum to ask questions in the future,
where you can obtain a faster response (Forum is at:
http://social.msdn.microsoft.com/forums/en-US/sqldataaccess/threads/)