Re: Post Revised: A Desperate Plea for Help



Scott,

The original poster already stated that he had Inser, Update and Delete SQL:

"Now, the adapters, I have noticed, contain command text for INSERT, UPDATE,
DELETE."

His problem is that he does not seem to realize that calling the adapter's
Update method will in turn call these sql statements:

"problem is, I don't know the syntax for using those commands or how
to declare them in code to use them."

That's why my advice was to call the data adapter's Update method.

Kerry Moorman


"Scott M." wrote:

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!



.



Relevant Pages

  • Re: COBOL stored procedure for DB2
    ... Regarding how you precompile the app, you must specify target mfcob to db2 prep, rather than target ibmcob. ... Have you also confirmed that, prior to executing the CALL statement, the host variables specified within the client app have the appropriate values? ... MODIFIES SQL DATA ... confirm the cob command used for creating the SP module. ...
    (comp.lang.cobol)
  • Re: Post Revised: A Desperate Plea for Help
    ... The original poster already stated that he had Inser, Update and Delete SQL: ... That's why my advice was to call the data adapter's Update method. ... But the bottom line here is that you need to create the SQL Statements for these command yourself and so you need to know SQL. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: COBOL stored procedure for DB2
    ... Have you also confirmed that, prior to executing the CALL statement, the ... The DB2 CREATE PROCEDURE statement. ... MODIFIES SQL DATA ... confirm the cob command used for creating the SP module. ...
    (comp.lang.cobol)
  • Re: Can this be done using a Data adapter??
    ... adapter's update method in this scenario. ... table1 as the columns of the datagrid view and records of table2 as ... view and manually run the insert or update SQL commands. ... The SQL statements, will just process the changed data, where ever or ...
    (microsoft.public.dotnet.languages.csharp)
  • multiple sql statements in OLE DB command
    ... But the command fails when I combine the 2 SQL ... OwnerID INTEGER IDENTITY NOT NULL, ... SQL statements (since I want compatibility with SQL Server; ...
    (microsoft.public.access.queries)