Re: Post Revised: A Desperate Plea for Help
- From: "Scott M." <s-mar@xxxxxxxxxxxxx>
- Date: Mon, 2 Apr 2007 15:35:54 -0400
Well, not quite. This will only work if you have configured your
DataAdapter using the DataAdapter Wizard and, even then, you may not get the
update you want.
What you need to do is write the correct UPDATE, DELETE and INSERT logic for
your DataAdapter's built-in UpdateCommand, DeleteCommand and InsterCommand
objects. You can set these statements as the proper statements to use via
the individual command's CommandText property.
But the bottom line here is that you need to create the SQL Statements for
these command yourself (in many cases) and so you need to know SQL.
"Kerry Moorman" <KerryMoorman@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:5C9ABD1F-EA25-44DC-BDB7-CB0485F6CAD0@xxxxxxxxxxxxxxxx
bill,
The data adapter's Update method handles all the Insert, Update and Delete
commands.
Just call the data adapter's Update method to save the data table's
changes
to the database.
Kerry Moorman
"billmcintee:VB NOOBIE" wrote:
Can anyone give me a thorough explanation on how to use my data adapters
to
insert new records into a SQL database that I have connected to my app. I
am
very new to SQL and a little familiar with VB. The purpose of the app is
to
be a front-end to populate fields in a SQL table with information
obtained
from a wedge scanner.
I have the the data objects created already in the form designer...here
are
the objects as follows:
Adapters:
db_Adapter1 'for the header table, tbl_HDR
db_Adapter2 'for the detail table, tbl_DET
SQL Connector:
db_Conn
Dataset:
db_RS
Now, the adapters, I have noticed, contain command text for INSERT,
UPDATE,
DELETE...problem is, I don't know the syntax for using those commands or
how
to declare them in code to use them. I see repeated use for them
everywhere...EX: INSERT INTO mytable(mycolumn) VALUES(@myvalue)...how the
heck do you get to this point?. Does anyone know what I speak of? Utter
frustration here!
.
- Follow-Ups:
- Re: Post Revised: A Desperate Plea for Help
- From: Kerry Moorman
- Re: Post Revised: A Desperate Plea for Help
- Prev by Date: DataSet RemotingFormat and Channel formatter
- Next by Date: Re: A desperate plea for help....
- Previous by thread: DataSet RemotingFormat and Channel formatter
- Next by thread: Re: Post Revised: A Desperate Plea for Help
- Index(es):
Relevant Pages
|