Re: A desperate plea for help....

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi Bill,

Thanks for the reply. I guess I need to be more clear as to what I am asking
for. I am seeing repeated use of INSERT INTO mytable(mycolumn)
Values(@myvalue) everywhere!...question is, how the heck do you get to
this?Is there any prereq code I am missing here?...I have noticed that this
is actually the insert command text in my data adapter as well. If you just
put this code in, VB says that "INSERT" is not declared...I am getting so
frustrated...thanks again...

"William (Bill) Vaughn" wrote:

I'm not at all certain why you need (or think you need) access to the
generated Commands but these are available at runtime through the
DataAdapter. For example, the INSERT command is found at
myDataAdapter.InsertCommand.CommandText

What text does the scanner extrude (exactly)?

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------

"billmcintee:VB NOOBIE" <billmcintee:VB NOOBIE@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote in message news:859C31FC-1027-4B96-A42A-1F1B1439C315@xxxxxxxxxxxxxxxx
Hello,

Currently, I am a spring chicken in VB and I am writing a program
concerning
vb.net 2003 and SQL Server 2005. This program is basically a data
collection
app in which collects data from a wedge scanner via barcodes. I have two
questions concerning this program.

1. I have created the sql connection, data adapter, and data set as
objects
within the form design and the data adapter automatically created my
INSERT,
UPDATE, and DELETE commands with the text strings. You probably already
know
what I am going to ask, but here goes...I need to access these commands
within the code of the app, but I am confused on how to access them. I
have
gone through alot of info on this, but mostly I see that the connection,
adapter, and dataset, etc. are invoked through the code. Do I need to do
this
even though these are already created through objects on the form? How do
I
access these objects through the code?
Here are the names of the objects as displayed in the form designer:

Data adapter:db_Adapter1
db_Adapter2
(I have two, one for my tbl_HDR table and one for my tbl_DET table. The
HDR
table contains a relationship with a field called ProcessID with the DET
Table and I have them set in SQL Server as AutoIncrement)


SQL Connector: db_Conn

Dataset: db_RS

I have tried to use an INSERT INTO command, but vb complains and says it's
not declared. I have a deadline on this and any and all help will be
appreciated. I need to use these commands to add, update, and delete
records
when the info is scanned in. As I said before, all of the info I am
getting
is only confusing me more...hopefully someone else had been in the same
position as I and can clear this up for me once and for all

2. If I try to use validation tactics for the scanner on the first textbox
control, the first letter appears in the field, I hear a beep, and the
rest
of the text goes into the other fields. If I do not use any input
validation,
it works fine...could this be due to using the default 'text_changed'
method
on the field? Or could this be due to a character that the scanner is
putting
in after scanning the bar code?

This seems like a great group to help others...TIA



.



Relevant Pages

  • Re: A desperate plea for help....
    ... Hitchhiker's Guide to Visual Studio and SQL Server ... app in which collects data from a wedge scanner via barcodes. ... within the form design and the data adapter automatically created my ... and DELETE commands with the text strings. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Joining table or using a view
    ... Most folks (using SQL Server ... > I am creating my data adapter and dataset in Visual Studio. ... > Studio will not create insert, update, or delete commands for this ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: 3 Simple Security SQL Statements
    ... If you run the SELECT in a query window, it generates the list of commands ... There is procedure called sp_executesql that will take a string and execute ... Kalen Delaney, SQL Server MVP ... Builds a list of text commands. ...
    (microsoft.public.sqlserver.security)
  • Re: newbie problem: updating an access db
    ... modifying the code to use SQL Server it still exhibited the same ... changed the path to the supplied access .mdb file in the web.config ... the delete and update commands, so now they just test whether Adnum= ?. ... get this code to work, I don't want to start modifying it to use MSSQL, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: HOW TO SEARCH FOR FILES ON WINDOWS 2008
    ... Does anybody know where Microsoft hid the SEARCH function? ... Some commands and options I find useful - ... They even have examples of how to search a URL or the entire world wide web on their web site. ... SQL Server Table Valued Parameters / Types - Multiple Row Inserts ...
    (microsoft.public.windows.server.general)