Re: problem connecting to ADO programmatically



"William Meyer" <meyer.wil@xxxxxxxxx> wrote in news:4814d709$1
@newsgroups.borland.com:

Chris.Cheney wrote:

However, I still think it is worth using a simpler connection string!

Trouble again....

The original string, from the wizard, is:
'Provider=Microsoft.Jet.OLEDB.4.0;Password="";User ID=Admin;Data
Source=I:\Development\CAP\CapWatch\CAPWATCH 24 MAY 07.MDB;Mode=Share
Deny None;Extended Properties="";Jet OLEDB:System database="";Jet
OLEDB:Registry Path="";Jet OLEDB:Database Password="";Jet OLEDB:Engine
Type=4;Jet OLEDB:Database Locking Mode=0;Jet OLEDB:Global Partial Bulk
Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database
Password="";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'

I am placing this string into ConnectString, on the fly:
'Provider=Microsoft.Jet.OLEDB.4.0;DataSource=I:\Development\CAP\CapWatch
\CAPWATCH 24 MAY 07.MDB;User ID=admin;Password=""'

Note two things: I observed that the last parameter in the list from
the wizard does not end with a semicolon, so eliminated that, though it
appears to make no real difference to the problem. Second, apart from
the specific filename and path, this is the same as the set of strings
you suggested.

And now I am back to the original error message. This issue of the
ConnectString appears to me to be a point of considerable fragility....


FWIW I can reproduce your problem with the identical error message.

It seems somehow to be associated with "reuse" of the TAdoConnection
component. Try freeing it and recreating it before putting in the new
connect string.

Chris
.



Relevant Pages

  • Re: Wizard Control Issue
    ... i think the Wizard should be able to work for your requirements. ... Tim I checked the code, these tags are opened and closed properly ... string MiddleName = string.Empty; ... string Country = string.Empty; ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: problem connecting to ADO programmatically
    ... The original string, from the wizard, is: ... I am placing this string into ConnectString, ... ConnectString appears to me to be a point of considerable fragility.... ...
    (borland.public.delphi.database.ado)
  • Re: Creating and setting registry key value
    ... I won't help debug code that is not written by a wizard. ... You could have used a pointer if a literal string were ... >why I want to edit the registry directly. ... Unicode-aware or not, but if it isn't, it would be an exceedingly poor choice of type. ...
    (microsoft.public.vc.mfc)
  • RE: Multiple table dataset
    ... This is a bit beyond wizard, but here is a quick sample in C# and VB.NET ... string connString = ""; ... Dim connString As String = "" ... >>> orders and orderDetails associated with the customer. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: dataadapter and stored procs in design time
    ... ITS SOOOOOO MUCH CLEANER THAN the pile of "code" the Wizard generates!!!!! ... don't have to type the connection string over and over... ... I need to fill a dataadapter with data from a stored procedure. ...
    (microsoft.public.dotnet.languages.vb)