Re: Post Revised: A Desperate Plea for Help



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: 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 I get Consultancy advice on SQL/Fox in the UK (South East)
    ... My problem is the two Sequel Server tables within one database with which I ... Don't ask me why but the SQL designers have NOT ... command that I can initiate with SQLCONNECT, ... > While you're in the View Designer, right-click and view the SQL code. ...
    (microsoft.public.fox.helpwanted)
  • Re: Optimistic Concurrency on UpdateCommand...
    ... client device, I update that column with a non-null datetime and then try to ... 1!!!If I copy and paste the command ... With the 4th column not allowing nulls, the optimistic concurrency code ... Can I have a nullable datetime column in my Sql ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Select - SQL vs. SUM
    ... If you have to use an earlier version of VFP earlier than 9, ... >> also force VFP to read from the buffer with a new clause in the SQL ... >> The SELECT command doesn't move the record pointer in the grid's record ... >>> I have a grid whose recordsource is a table named _payments. ...
    (microsoft.public.fox.programmer.exchange)