Re: how to disable an AdoConnection




the problem is that i need the connection string because in design mode i open the datasets , when im building the grids columns to see if the data is shown correct, or when im doing a raport file in raport designer.

and if i will relly on manually removing the connection string every time i build a version (often) ... sometimes im gonna forget and the clients will get the nice error at start.

i was thinking if i can stop from code the connection from connecting ... something like having a flag CanConnect and setting it only after i choose the server and password.

now i need a way to stop the connection from connecting i tryied on BeforeConnect if CanConnect=false then Abort ... but it still connects ...

removing the connection string in before connect doesnt help, because i think it already uses it, because even if i make the string empty in before connect ,.... it still connects.
.



Relevant Pages

  • Re: [SOLVED] Cannot display provider-specific login prompt
    ... scenario where the program wouldn't have to know about the database, ... ConnectionStringBuilder up to a PropertyGrid for the end user to populate), ... details of the connection, for the sake of the program being able to connect ... information about the connection string that I will need. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Complicated Connection Problems bewteen ADP and SQL Server
    ... front end on the 5-8 workstations where the users happen to sit. ... expertise for getting the user workstations talking to the SQL Server. ... connection would fail and the adp wouldn't be able to talk to the server. ... thought that I should instead change my connection string to something ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Fujitsu NetCobol 8.0
    ... You cannot use a connection string in the way you have shown and expect it ... Any Fujitsu NetCobol / PowerCobol users here? ... Use the ADO control provided in PowerCOBOL, ...
    (comp.lang.cobol)
  • Re: Changing Connection String programmatically
    ... This is a good situation for putting the connection string information in the app.config file. ... every year we will create new database. ... change the body of the private void InitConnection(), ...
    (microsoft.public.sqlserver.connect)
  • Re: ASP.net and Oracle error System.Data.OleDb.OleDbException
    ... Also see http://www.connectionstrings.com/ and try other providers ... > Here is some of my connection code: ... >> And are you sure your connection string is ok. ... >>> Oracle error occurred, but error message could not be retrieved from ...
    (microsoft.public.dotnet.framework.aspnet)