We help IT Professionals succeed at work.

Using the SqlAdapter in vb.net

running32
running32 asked
on
248 Views
Last Modified: 2012-08-14
How can you tell what the error is when using the SqlAdapter in vb.net.   I keep getting errors on the update and delete but it does not say what they are.

Thanks
Comment
Watch Question

Show some code.

Author

Commented:
SELECT lngPatientId, strPatientId, lngHouseId, ysnInsNone, ysnInsCICP, ysnInsCAP, ysnInsCWCCI, ysnInsChild, ysnInsMigrant, ysnInsMaid, ysnInsMcare, ysnInsOther, strMedicaid, strMedicare, lngHeadId, memNote, bytPay, ysnVeteran, ysnTAFN FROM tblPatient WHERE (lngPatientId = @Param1)

Here is some code within the Data Adapter Configuration Wizard.  It appears that it does not like to do an update or delete from tblPatient now regardless of which files I choose.

Thanks
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Commented:
Hi running32

As Roger states - it sounds like a Primary Key problem.If you dont have set anyone in your table then try set one and remember to rebuild your adapter.
That way the adapter will be included with the insert and update statements also.

vbturbo

Author

Commented:
Thanks
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.