473,322 Members | 1,425 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,322 software developers and data experts.

Database all to Pot

Hey Gorup,

I keep getting this error:
An unhandled exception of type 'System.InvalidOperationException' occurred
in system.data.dll

When trying to run the following code from a Button:
Private Sub btnPasswordListUpdate_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles btnPasswordListUpdate.Click
odaPasswordLists.Update(dsPasswordLists)
End Sub

Anyone have any General Ideas?

Ta
Si
Nov 20 '05 #1
4 931
Well that Exception is very generic when working with Databases. Look at
the Err.Description to get a better understanding of what's going wrong

"Newbie!" <s_************@yahoo.co.uk> wrote in message
news:ev********************@karoo.co.uk...
Hey Gorup,

I keep getting this error:
An unhandled exception of type 'System.InvalidOperationException' occurred
in system.data.dll

When trying to run the following code from a Button:
Private Sub btnPasswordListUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPasswordListUpdate.Click
odaPasswordLists.Update(dsPasswordLists)
End Sub

Anyone have any General Ideas?

Ta
Si

Nov 20 '05 #2
Where would i find the err.description?

Ta
Si

"Mike Bulava" <mb*****@comcast.net> wrote in message
news:ei*************@tk2msftngp13.phx.gbl...
Well that Exception is very generic when working with Databases. Look at
the Err.Description to get a better understanding of what's going wrong

"Newbie!" <s_************@yahoo.co.uk> wrote in message
news:ev********************@karoo.co.uk...
Hey Gorup,

I keep getting this error:
An unhandled exception of type 'System.InvalidOperationException' occurred in system.data.dll

When trying to run the following code from a Button:
Private Sub btnPasswordListUpdate_Click(ByVal sender As System.Object,

ByVal
e As System.EventArgs) Handles btnPasswordListUpdate.Click
odaPasswordLists.Update(dsPasswordLists)
End Sub

Anyone have any General Ideas?

Ta
Si


Nov 20 '05 #3
Sorry didn't see the Name. In the Catch block of Code type
MsgBox(Err.Description) .

Err is like an exception and gets thrown with exceptions it used to be the
main way of catching errors in older VB, I still use it a lot to this day
though because the description in that is usally 10 times better then the
exception.

"Newbie!" <s_************@yahoo.co.uk> wrote in message
news:kf********************@karoo.co.uk...
Where would i find the err.description?

Ta
Si

"Mike Bulava" <mb*****@comcast.net> wrote in message
news:ei*************@tk2msftngp13.phx.gbl...
Well that Exception is very generic when working with Databases. Look at
the Err.Description to get a better understanding of what's going wrong

"Newbie!" <s_************@yahoo.co.uk> wrote in message
news:ev********************@karoo.co.uk...
Hey Gorup,

I keep getting this error:
An unhandled exception of type 'System.InvalidOperationException'

occurred in system.data.dll

When trying to run the following code from a Button:
Private Sub btnPasswordListUpdate_Click(ByVal sender As System.Object,

ByVal
e As System.EventArgs) Handles btnPasswordListUpdate.Click
odaPasswordLists.Update(dsPasswordLists)
End Sub

Anyone have any General Ideas?

Ta
Si



Nov 20 '05 #4
You may have a reserved word as one of your field names in the database.
This will cause the update to fail. You don't show the Insert/delete/update
statements for the DataAdapter so it's hard to tell if this is actually the
problem. If you are using a CommandBuilder set the QuotePrefix and
QuoteSuffix properties appropriately. A field name like password will cause
this error.
Try putting a try/catch statement around your Update call and print the
message and stack trace from the trapped error to get more detail.
Ron Allen
"Newbie!" <s_************@yahoo.co.uk> wrote in message
news:ev********************@karoo.co.uk...
Hey Gorup,

I keep getting this error:
An unhandled exception of type 'System.InvalidOperationException' occurred
in system.data.dll

When trying to run the following code from a Button:
Private Sub btnPasswordListUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPasswordListUpdate.Click
odaPasswordLists.Update(dsPasswordLists)
End Sub

Anyone have any General Ideas?

Ta
Si

Nov 20 '05 #5

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

Similar topics

0
by: Cherrish Vaidiyan | last post by:
sir, The following are the steps that i followed in setting up standby database on Red hat Linux 9. i am using Oracle 9i. i have followed the steps in this site : ...
6
by: Marvin Libson | last post by:
Hi All: I am running DB2 UDB V7.2 with FP11. Platform is Windows 2000. I have created a java UDF and trigger. When I update my database I get the following error: SQL1224N A database...
8
by: Kamlesh | last post by:
Hi, How do I know the physical database path of a database. When I goto the DB2INSTANCE users's directory (/home/db2inst1), I see following folders: /db2inst1/NODE0000/SQL00001...
1
by: pintur | last post by:
The message is: SQL1036C Errore di I/O durante l' accesso al database. SQLSTATE=58030 what is the proble? what for restore tables? thanks
3
by: josh.kuo | last post by:
Sorry about the subject, I can't think of a better one. I recently wrote some PHP classes that I think might be of interest to this group. Since I have been reaping the benefits of reading news...
8
by: morleyc | last post by:
Hi, until recently i was quite happy to add data sources from mssql database in visual studio and drag the datasets directly onto the form this creating a directly editable form which worked well....
0
by: Jack | last post by:
Training Classes for Oracle10g, 9i, 8i Certification training in Oracle10g and 9i: DBA, Developer, Discoverer. training conducted at your location worldwide. Courseware licensing also available....
0
by: Winder | last post by:
Training Classes for Oracle10g, 9i, 8i Certification training in Oracle10g and 9i: DBA, Developer, Discoverer. training conducted at your location worldwide. Courseware licensing also available....
0
by: Laurynn | last post by:
# (ebook - pdf) - programming - mysql - php database applicati # (Ebook - Pdf)Learnkey How To Design A Database - Sql And Crystal Report # (ebook-pdf) E F Codd - Extending the Database Relational...
9
by: Peter Duniho | last post by:
Is there a straightfoward API in .NET that allows for inspection of a database? That is, to look at the structure of the database, without knowing anything in advance about it? For example,...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.