Connection problem in VS.NET designer

B

Ben

Hi,

I've got a C# Component to which I've added an OleDbConnection and two
OleDbDataAdapters, using the VS.NET designer, with no problems. Adding a
third, whose data is not substantially different from the others--SELECT
Table.* FROM Table--the designer gives the following error in the final
stage of the wizard:

"The connection could not be opened because of the following error:
Format of the initialization string does not conform to the OLE DB
specification.."

Further, the designer gives this error when trying to reconfigure the two
existing data adapters--which it created without error in the first place!
After I click OK on the error above, I get a prompt for username/password:
the username is set to Admin and the password is blank. This database is a
local Access file and is not protected. I have not changed the connection
since it was first created. The string, generated by the designer, is as
follows:

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

The connection and existing data adapters function correctly when the
application runs. Only the designer chokes.

Any suggestions?

Thanks in advance!

Ben
 
B

Ben

Hi Miha,

No, just providing a (poor, in retrospect) representation of the statements
the adapters are using. The actual is "SELECT Bulbs.* FROM Bulbs". The other
adapters use the same statement with different tables.

Ben

Miha Markic said:
Hi Ben,

Is your table actually named table?

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

Ben said:
Hi,

I've got a C# Component to which I've added an OleDbConnection and two
OleDbDataAdapters, using the VS.NET designer, with no problems. Adding a
third, whose data is not substantially different from the others--SELECT
Table.* FROM Table--the designer gives the following error in the final
stage of the wizard:

"The connection could not be opened because of the following error:
Format of the initialization string does not conform to the OLE DB
specification.."

Further, the designer gives this error when trying to reconfigure the two
existing data adapters--which it created without error in the first place!
After I click OK on the error above, I get a prompt for username/password:
the username is set to Admin and the password is blank. This database is a
local Access file and is not protected. I have not changed the connection
since it was first created. The string, generated by the designer, is as
follows:

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

The connection and existing data adapters function correctly when the
application runs. Only the designer chokes.

Any suggestions?

Thanks in advance!

Ben
 
M

Miha Markic [MVP C#]

Hi Ben,

Is a structure of Bulbs special in any way?
Like spaces in field names, etc

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

Ben said:
Hi Miha,

No, just providing a (poor, in retrospect) representation of the statements
the adapters are using. The actual is "SELECT Bulbs.* FROM Bulbs". The other
adapters use the same statement with different tables.

Ben

Miha Markic said:
Hi Ben,

Is your table actually named table?

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

Ben said:
Hi,

I've got a C# Component to which I've added an OleDbConnection and two
OleDbDataAdapters, using the VS.NET designer, with no problems. Adding a
third, whose data is not substantially different from the others--SELECT
Table.* FROM Table--the designer gives the following error in the final
stage of the wizard:

"The connection could not be opened because of the following error:
Format of the initialization string does not conform to the OLE DB
specification.."

Further, the designer gives this error when trying to reconfigure the two
existing data adapters--which it created without error in the first place!
After I click OK on the error above, I get a prompt for username/password:
the username is set to Admin and the password is blank. This database
is
 
B

Ben

Not at all. And as I said, I get the same error trying to reconfigure
existing adapters with no change in parameters. It's looking more like a bug
in the designer: when I select "Preview Data", the first time I press "Fill
Dataset" I get the same error, then username/password prompt. If I hit
cancel from the latter, it fills the dataset anyway--correctly.

Ben

Miha Markic said:
Hi Ben,

Is a structure of Bulbs special in any way?
Like spaces in field names, etc

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

Ben said:
Hi Miha,

No, just providing a (poor, in retrospect) representation of the statements
the adapters are using. The actual is "SELECT Bulbs.* FROM Bulbs". The other
adapters use the same statement with different tables.

Ben

Miha Markic said:
Hi Ben,

Is your table actually named table?

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

Hi,

I've got a C# Component to which I've added an OleDbConnection and two
OleDbDataAdapters, using the VS.NET designer, with no problems.
Adding
a the
two
database
is
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top