Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Newbie - Problem Updating! - getting desperate!
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00861305
Message ID:
00861322
Vues:
21
I've tried it both ways...including just now, and it give me the same results.
One of the things that baffles me is that even tho it's hard coded, it does nothing.
Is there something I need to do before the
UpdateResult = OleDbDataAdapter2.Update(DSemployees1) ?

---------------------------
>Could it be the double quotes - SQL server uses single quotes like this:
>
>UPDATE Employees SET
>LastName = 'Brown_10'
>WHERE (EmployeeID = 10)
>
---------------------------------
>>Here's where I'm stuck...
>>
>>I'm working on a small learning project and I'm having a problem updating my data files... (I'm using a copy of the Northwind database which is designed for use with Access. I'm using the Orders and Employees tables.)
>>
>>In my current implementation I used the wizards for the DataAdapters and DataSets and bound my DataGrid and textboxes to fields in my DataSets.
>>I don't understand why my update code isn't updating (and my insert code isn't inserting)...
>>
>>I have a form where I let the DataAdapter wizard create the code to update the Northwind Employees table.
>>On my form I display all the fields of the table.
>>All the information displays correctly.
>>
>>Originally the wizard generated a large complex SQL UPDATE statement. I've simplfied that, hard coding the information, down to
>>
UPDATE Employees SET
>>LastName = "Brown_10"
>>WHERE (EmployeeID = 10)
>>
>>
>>Even so, when I do an
>>
>>Dim UpdateResult As Integer = -1
>>UpdateResult = OleDbDataAdapter2.Update(DSemployees1)
>>
>>the OleDbDataAdapter2.Update returns a zero indicating it didn't update anything
>>
>>Why would that be?
>>
>>(BTW - Yes, I do have a record where EmployeeID = 10 and that record's current last name is "Brown" not "Brown_10")
>>
>>I've been stuck on this since last week!
>>I'm completely baffled!
>>Any help would be greatly appreciated!
>>Someone please help!

>>
>>Rick
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform