473,570 Members | 2,888 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

AdoDc control peculiar problem

I have a form with an AdoDc control associated to a datagrid.
The AdoDC uses a "ConnectionStri ng" such as
"Provider=Micro soft.Jet.OLEDB. 4.0;Persist Security Info=False;Data
Source=..."

this is where the problem begins. The data source will not be known until
the user selects the database.

What is really weird is that if the source is not placed during design time,
during run time the form upon loading will generate an error ("Failed to
authenticate"). This error seems to be untrappable since it doesn't occur in
the Form Load or Activate event (I have tried to catch it there).

Of course once the error is ignored and the datasource is set in the form
load, everything works OK.

Anyone has any idea how this error can be trapped or eliminated?

Thanks in advance for your time.
Jan 10 '06 #1
4 5976

"Raoul Watson" <Wa*****@Intell igenCIA.com> wrote in message
news:wOEwf.1807 $JT3.1534@trndn y06...
I have a form with an AdoDc control associated to a datagrid.
The AdoDC uses a "ConnectionStri ng" such as
"Provider=Micro soft.Jet.OLEDB. 4.0;Persist Security Info=False;Data
Source=..."

this is where the problem begins. The data source will not be known until
the user selects the database.

What is really weird is that if the source is not placed during design time,
during run time the form upon loading will generate an error ("Failed to
authenticate"). This error seems to be untrappable since it doesn't occur in
the Form Load or Activate event (I have tried to catch it there).

Of course once the error is ignored and the datasource is set in the form
load, everything works OK.

You should be able to start the app without an error if the connection string
property of the ADODC control is completely blank. Then set the entire
connection string in code, including the part about "Provider=" etc.
Jan 10 '06 #2
The error is not thrown that's why you are not seeing it there it is
displayed by the adodc

put this in the adodc_error event thandler

fCancelDisplay = True

and it will stop the error being displayed

"Steve Gerrard" <my********@com cast.net> wrote in message
news:fs******** ************@co mcast.com...

"Raoul Watson" <Wa*****@Intell igenCIA.com> wrote in message
news:wOEwf.1807 $JT3.1534@trndn y06...
I have a form with an AdoDc control associated to a datagrid.
The AdoDC uses a "ConnectionStri ng" such as
"Provider=Micro soft.Jet.OLEDB. 4.0;Persist Security Info=False;Data
Source=..."

this is where the problem begins. The data source will not be known until
the user selects the database.

What is really weird is that if the source is not placed during design
time,
during run time the form upon loading will generate an error ("Failed to
authenticate"). This error seems to be untrappable since it doesn't occur
in
the Form Load or Activate event (I have tried to catch it there).

Of course once the error is ignored and the datasource is set in the form
load, everything works OK.

You should be able to start the app without an error if the connection
string property of the ADODC control is completely blank. Then set the
entire connection string in code, including the part about "Provider="
etc.

Jan 10 '06 #3

"Steve Gerrard" <my********@com cast.net> wrote in message
news:fs******** ************@co mcast.com...

"Raoul Watson" <Wa*****@Intell igenCIA.com> wrote in message
news:wOEwf.1807 $JT3.1534@trndn y06...
I have a form with an AdoDc control associated to a datagrid.
The AdoDC uses a "ConnectionStri ng" such as
"Provider=Micro soft.Jet.OLEDB. 4.0;Persist Security Info=False;Data
Source=..."

this is where the problem begins. The data source will not be known until the user selects the database.

What is really weird is that if the source is not placed during design time, during run time the form upon loading will generate an error ("Failed to
authenticate"). This error seems to be untrappable since it doesn't occur in the Form Load or Activate event (I have tried to catch it there).

Of course once the error is ignored and the datasource is set in the form load, everything works OK.
You should be able to start the app without an error if the connection

string property of the ADODC control is completely blank. Then set the entire
connection string in code, including the part about "Provider=" etc.


Thanks.. but remember I have a grid with a datasource pointing to AdoDC so
if I marked ConnectionStrin g and leave it blank, I'll get an error
"[Microsoft][ODBC Driver Manager] Data source name not found and no default
driver specified." upon form load (again, untrappable)
Jan 11 '06 #4
T H A N K S !! John. I appreciate it very much.
I didn't know how to completely discard the error,
your solution is perfect for my problem. thanks again.

"John Smith" <so*****@micros oft.com> wrote in message
news:43******** *************** @news.optusnet. com.au...
The error is not thrown that's why you are not seeing it there it is
displayed by the adodc

put this in the adodc_error event thandler

fCancelDisplay = True

and it will stop the error being displayed

"Steve Gerrard" <my********@com cast.net> wrote in message
news:fs******** ************@co mcast.com...

"Raoul Watson" <Wa*****@Intell igenCIA.com> wrote in message
news:wOEwf.1807 $JT3.1534@trndn y06...
I have a form with an AdoDc control associated to a datagrid.
The AdoDC uses a "ConnectionStri ng" such as
"Provider=Micro soft.Jet.OLEDB. 4.0;Persist Security Info=False;Data
Source=..."

this is where the problem begins. The data source will not be known until the user selects the database.

What is really weird is that if the source is not placed during design
time,
during run time the form upon loading will generate an error ("Failed to authenticate"). This error seems to be untrappable since it doesn't occur in
the Form Load or Activate event (I have tried to catch it there).

Of course once the error is ignored and the datasource is set in the form load, everything works OK.

You should be able to start the app without an error if the connection
string property of the ADODC control is completely blank. Then set the
entire connection string in code, including the part about "Provider="
etc.


Jan 11 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3717
by: News Central | last post by:
Hi All!, I have a problem refreshing data on the Datagrid control. I execute sql statement directly using the ADODC control and try to make it updated onto the Datagrid control, however, the Datagrid control is not updated with new data... here is the flagment of codes: sql = "update MyTable set Col1='test' where Col1='nodata'"...
0
1136
by: Meher Malakapalli | last post by:
Hi I have an application built in VB6. It uses an adodc control bound to several other controls. After installing the .NET framework, the application's data-bound controls no longer display the data from the recordset contained by the adodc control. Has anyone run into this problem? Thanks M
1
1206
by: nkechifesie | last post by:
I have used both Adodc and Data control on the same form, is it okay, would it pose any problem for me?
4
1955
by: nkechifesie | last post by:
I have an adodc control that is build with several tables using the select command. I need to search for a record on the adodc, is it possibles? If yes, how?
1
1540
by: pramodrepaka | last post by:
Hello Guys Plz Help me Here is my problem . Unable to retriew the data beteen oracle and vb by using ADODC control i.e if a table consists of Nll values. i am created table and i got successful connection between oracle and VB6.0 .So i want to add some fields at vb and it should update in oracle(But not all fields) by...
9
3309
by: Neelesh2007 | last post by:
Hi All, I have developed project in VB6.0 with access as backend.I have used ADODC control in VB to retrieve data from access. I have created the Setup file by Package & Deployment. Now when i install the software on other PC whole program works fine but ADODC can not establish connection with database. Then if I install VB6.0 then only ADODC...
6
7090
by: jaz215 | last post by:
hi! in my program i'm using the find and bookmark function of the adodc control. as the people want me to use a normal data control, when i tried to run it using the same commands i've got an error. is there any other way to do this function through a data control? i'll post on what i've got but i it seems no to work. can anyone help me pls.. ...
1
2127
by: hussainiyad | last post by:
Dear all, i,m new to v.b and i tried to connect to sqlserver through adodc in a datagrid or datalist , but there was no result in my form, can any one tell me what's the reason and i done every thing to connect with the sql step 1:Right click the adodc control declared the provider,database,pwd step2.: In choose Record source i declaled the...
6
2391
by: hussainiyad | last post by:
Hi all, Can anyone tell me how to get a record for particular field, in my sql i,v Pinvoice table following fields InvNo int ItemNo int Descrption varchar(20) Price float Qty Gross float 1001 090 Fan 30 5 150 1001 080 Table ...
0
7633
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7944
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8149
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7699
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8000
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5247
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3681
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2131
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1238
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.