Javin007
asked on
Need help using DataSet to update an MSAccess database.
Okay, this is driving me insane. I've spent two days on it, and need a very clear, very concise answer. It will need to have a working code example, not a link to yet another of the 1000 websites I've been routed to through google that I've gotten NOWHERE with. I will not even bother responding to "answers" that say "here, look at this link." I've spent 48 hours looking at links, now I want an answer...
That being said, I'm a VB6er of many years, making the switch to .NET, and can't fathom who in their right mind would've developed such a convoluted system for data access. I currently have an application that does the following:
oleCON = CON 'CON is a connection with the connection string passed to the class.
oleCOM = New OleDb.OleDbCommand 'New command.
oleDA = New OleDb.OleDbDataAdapter 'New Data Adapter.
oleDataSet = New Data.DataSet 'New Dataset.
oleCOM.Connection = oleCON 'Link the command object to the data adapter.
Then I populate the dataset like so:
oleCOM.CommandText = SQL
oleDA.SelectCommand = oleCOM
oleDA.Fill(oleDataSet)
Up to this point, everything's fine. I'm able to modify the items in the dataset, and everything works until I try to then write that dataset BACK to the database:
I started with:
oleDA.Update(oleDataSet)
That threw an error, and what I tried next threw an error, and this has continued for 2 days. I NEED A SOLUTION.
-Javin
That being said, I'm a VB6er of many years, making the switch to .NET, and can't fathom who in their right mind would've developed such a convoluted system for data access. I currently have an application that does the following:
oleCON = CON 'CON is a connection with the connection string passed to the class.
oleCOM = New OleDb.OleDbCommand 'New command.
oleDA = New OleDb.OleDbDataAdapter 'New Data Adapter.
oleDataSet = New Data.DataSet 'New Dataset.
oleCOM.Connection = oleCON 'Link the command object to the data adapter.
Then I populate the dataset like so:
oleCOM.CommandText = SQL
oleDA.SelectCommand = oleCOM
oleDA.Fill(oleDataSet)
Up to this point, everything's fine. I'm able to modify the items in the dataset, and everything works until I try to then write that dataset BACK to the database:
I started with:
oleDA.Update(oleDataSet)
That threw an error, and what I tried next threw an error, and this has continued for 2 days. I NEED A SOLUTION.
-Javin
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
In response to Modus_Operandi:
Since your E-Mail was sent from a noreply address, and I cannot seem to find a way to speak to you directly, this will be the forum I must use to address your E-Mail to me. Your E-Mail was as follows:
Javin007,
Your lead-in to one of your recent questions
(https://www.experts-exchange.com/questions/23002424/Need-help-using-DataSet-to-update-an-MSAccess-database.html) is rude an unprofessional.
The Experts here are all volunteers, and as such they deserve your courtesy. You
have been warned before about such behavior; another such instance can lead to
an account suspension.
modus_operandi
EE Moderator
My response:
For starters, I am a PAYING customer. I dump $10 a month into EE to get an occasional question answered. I have even ANSWERED more questions that I have HAD answered for that $10 a month. I'm fully aware of what the "experts" here are after being a member for half a decade. I have quite literally paid hundreds of dollars to EE, check my account.
That being said, my "lead-in" was not "rude an<sic> unprofessional." What my lead-in WAS is very clear as to what I would consider an acceptable answer. I'd venture to say over 50% of the answers on EE have filtered down to "here's a link, look it up" which will not be an acceptable answer in this case.
If EE is now making so much money that a paying customer has to tolerate harassment from incredibly oversensitive moderators, then by all means, close my account, refund my $10 for this month (since I started it back up last night and have yet to get an answer) and I will not return to spend any more money on this "service."
-Javin
Since your E-Mail was sent from a noreply address, and I cannot seem to find a way to speak to you directly, this will be the forum I must use to address your E-Mail to me. Your E-Mail was as follows:
Javin007,
Your lead-in to one of your recent questions
(https://www.experts-exchange.com/questions/23002424/Need-help-using-DataSet-to-update-an-MSAccess-database.html) is rude an unprofessional.
The Experts here are all volunteers, and as such they deserve your courtesy. You
have been warned before about such behavior; another such instance can lead to
an account suspension.
modus_operandi
EE Moderator
My response:
For starters, I am a PAYING customer. I dump $10 a month into EE to get an occasional question answered. I have even ANSWERED more questions that I have HAD answered for that $10 a month. I'm fully aware of what the "experts" here are after being a member for half a decade. I have quite literally paid hundreds of dollars to EE, check my account.
That being said, my "lead-in" was not "rude an<sic> unprofessional." What my lead-in WAS is very clear as to what I would consider an acceptable answer. I'd venture to say over 50% of the answers on EE have filtered down to "here's a link, look it up" which will not be an acceptable answer in this case.
If EE is now making so much money that a paying customer has to tolerate harassment from incredibly oversensitive moderators, then by all means, close my account, refund my $10 for this month (since I started it back up last night and have yet to get an answer) and I will not return to spend any more money on this "service."
-Javin
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Wayne:
I'm fully aware of this, as I have also answered dozens of questions here for people. My statement about paying was in reference to the harassment I've been receiving from the moderators. My "lead-in" was a statement that very clearly outlined the requirements for awarding of the points.
As for this question, it's already too late for an answer to do me any good. After this "dialogue" I had chosen to use a completely different route, and am doing the entire application with just SQL commands. Thank you for your time, anyway. I'll split the points between you and sognoct for your effort.
I'm fully aware of this, as I have also answered dozens of questions here for people. My statement about paying was in reference to the harassment I've been receiving from the moderators. My "lead-in" was a statement that very clearly outlined the requirements for awarding of the points.
As for this question, it's already too late for an answer to do me any good. After this "dialogue" I had chosen to use a completely different route, and am doing the entire application with just SQL commands. Thank you for your time, anyway. I'll split the points between you and sognoct for your effort.
ASKER