473,386 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

ODBC connection weird problem..seeking for help . Thanks

My problem was it will prompt this message "An unhandled exception of type 'System.Data.Odbc.OdbcException' occurred in system.data.dll", when i click many time of a button "A" that will call the function below:

I noticed when everytime click on the button "A", the function below will run for 3 times, because got other events also call this function to get the value.

I have this function to get a single value from access table when everytime this function been call.

Dim objValue As Object
Dim cn As OdbcConnection

cn = New OdbcConnection("Driver={Microsoft Access Driver (*.mdb)};DBQ=" & pConn.Split("=")(2) & ";UID=;PWD=")

Dim cmd As OdbcCommand = New OdbcCommand(pCmd, cn)
cn.Open()
objValue = cmd.ExecuteScalar
cn.Close()
cn.Dispose()
cn = Nothing
cmd.Dispose()
cmd = Nothing

----------------------------
Oct 7 '07 #1
3 2594
hi, i found another message while i debugging....
here is the message:
"Run-time exception thrown : System.Data.Odbc.OdbcException - ERROR [08004] [Microsoft][ODBC Microsoft Access Driver] Too many client tasks.
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed"

sorry...i should tell you all, that im using VB.net 2003 and MS access as DB.

Thanks for help, please
Oct 7 '07 #2
Shashi Sadasivan
1,435 Expert 1GB
could you please explain when you mean that abt the 3 times thing?

did you have the access file open when running the application?

cheers
Oct 7 '07 #3
kenobewan
4,871 Expert 4TB
You could deactivate the button when the process starts. Asp.net 2 has a cool clickonce event.
Oct 7 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Vic Spainhower | last post by:
Hello, I appologise if this is not the correct forum for this problem but I posted this in the Access Group and didn't get a response. I've gotten some really good and fast help here and I'd...
11
by: Wolfgang Kaml | last post by:
Hello All, I have been working on this for almost a week now and I haven't anything up my sleeves anymore that I could test in addition or change.... Since I am not sure, if this is a Windows...
5
by: SerGioGio | last post by:
Hello, I am going nuts. I am trying to connect to my local ORACLE instance using ODBC. It used to work few weeks ago, but it fails now. Connection with: - SQL*plus: connection works! -...
11
by: DJJ | last post by:
I am using the MySQL ODBC 3.51 driver to link three relatively small MySQL tables to a Microsoft Access 2003 database. I am finding that the data from the MySQL tables takes a hell of a long time...
5
by: Todd Huish | last post by:
I have noticed something disturbing when retrieving datasets over a relatively slow line (multiple T1). I am looking at about 25 seconds to retrieve 500 rows via a php-odbc link. This same select...
4
by: Dave | last post by:
Hey guys, I have an ODBC problem that has me stumped. I wrote a VBA script to run in Microsoft Excel that pulls data out of an application using that application's ODBC driver and puts it into...
1
by: RLN | last post by:
RE: Access 2003 using WinXP SP2 Problem: When I start up my app I double click either one of my two Oracle tables in the table list, it asks for an id and pass. I need them to be linked at...
0
by: yefei | last post by:
it is very weird I set the same connection string for ODBC connect to dBase file in asp.net and the file is the same, just copied from one PC to another PC but what happens is that it runs well...
8
by: Greg Strong | last post by:
Hello All, The short questions are 1 Do you know how to make DSN connection close in Access to Oracle 10g Express Edition? &/or 2 Do you know how to make a DSN-less pass-through query...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
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...

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.