Home All Groups Group Topic Archive Search About
Author
29 Mar 2005 12:39 AM
barret bonden
I get

An unhandled exception of type 'System.ArgumentException' occurred in
system.data.dll
  Additional information: Format of the initialization string does not
conform to specification starting at index 175.

from this line:  cn.ConnectionString = bs

listing (more or less out of  page 712, MS's "Programming VB.net")
Dim bs As String

bs = "Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data
Source=C:\backup\laptop\debt\benifits.mdb;Mode=ReadWrite|Share Deny
None;Extended Properties="";Jet OLEDB:System database="";Jet OLEDB:Registry
Path="";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet
OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet
OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet
OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica
Repair=False;Jet OLEDB:SFP=False "

Dim cn As New OleDbConnection

cn.ConnectionString = bs

cn.Open()

Author
29 Mar 2005 1:39 AM
Val Mazur (MVP)
Looks like there is something wrong with the connection string, but I
personally do not see anything obvious. I would suggest to remove all the
properties first from the connection string except Provider, User ID and
Data Source. It should work. Then try to add properties one-by-one and see
which one causes troubles

--
Val Mazur
Microsoft MVP

http://xport.mvps.org



Show quote
"barret bonden" <art***@networks-cc.com> wrote in message
news:Rr12e.11067$fQ1.7027@fe10.lga...
>I get
>
> An unhandled exception of type 'System.ArgumentException' occurred in
> system.data.dll
>  Additional information: Format of the initialization string does not
> conform to specification starting at index 175.
>
> from this line:  cn.ConnectionString = bs
>
> listing (more or less out of  page 712, MS's "Programming VB.net")
> Dim bs As String
>
> bs = "Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data
> Source=C:\backup\laptop\debt\benifits.mdb;Mode=ReadWrite|Share Deny
> None;Extended Properties="";Jet OLEDB:System database="";Jet
> OLEDB:Registry
> Path="";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet
> OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet
> OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet
> OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica
> Repair=False;Jet OLEDB:SFP=False "
>
> Dim cn As New OleDbConnection
>
> cn.ConnectionString = bs
>
> cn.Open()
>
>
>
Author
29 Mar 2005 3:02 AM
gabe garza
bs is trying to intitialize with double quotes, yet you have double quotes
for Extended Properties,  System Database and Registry Path.
Change Extended Properties,  System Database and Registry Path to use single
quotes.


Show quote
"barret bonden" <art***@networks-cc.com> wrote in message
news:Rr12e.11067$fQ1.7027@fe10.lga...
>I get
>
> An unhandled exception of type 'System.ArgumentException' occurred in
> system.data.dll
>  Additional information: Format of the initialization string does not
> conform to specification starting at index 175.
>
> from this line:  cn.ConnectionString = bs
>
> listing (more or less out of  page 712, MS's "Programming VB.net")
> Dim bs As String
>
> bs = "Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data
> Source=C:\backup\laptop\debt\benifits.mdb;Mode=ReadWrite|Share Deny
> None;Extended Properties="";Jet OLEDB:System database="";Jet
> OLEDB:Registry
> Path="";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet
> OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet
> OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet
> OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica
> Repair=False;Jet OLEDB:SFP=False "
>
> Dim cn As New OleDbConnection
>
> cn.ConnectionString = bs
>
> cn.Open()
>
>
>

AddThis Social Bookmark Button