how to handle null values while doing insert/update? here's my problem, the following SQL fails:
INSERT INTO t_customer (cust_cde, cust_name, m_ind, start_dte, lst_upd_id)
VALUES (,'Tata Young','','2/4/2005','sResh12')
db design:
cust_cde is smallint type in db that allows null.
cust_ind...
Is it required to have quotes around field values while doing insert/update/delete?
e.g.
INSERT INTO t_customer (cust_cde, cust_name, m_ind, start_dte, lst_upd_id)
VALUES ('452','Tata Young','S','2/4/2005','sResh12')
I receive following err msg if there's no quotes around field values (in this...
I can't get commandbuilder to generate insert/update/delete command in Sybase, so I want to write my own update logic. But I want to avoid writing update/insert/delete routine for each table. I've got about 40 tables. Is there a way for doing this?
Thanx.
Public function SaveCustomer() as...
I am trying to update a record in customer table located in sybase database.
I use commandbuilder. I get following error msg. How can I fix it?
It works in SQL Server. Thanx.
ERROR [HY00] [INTERSOLV][ODBC SQL Server driver][SQL Server]
Incorrect syntax near the keyword 'DEFAULT'.
commandText...
I am trying to update a record in customer table located in sybase database.
I use commandbuilder. I get following error msg. How can I fix it?
It works in SQL Server. Thanx.
ERROR [HY00] [INTERSOLV][ODBC SQL Server driver][SQL Server]
Incorrect syntax near the keyword 'DEFAULT'.
commandText...
Got the items showing on the checklistbox working this way:
Private Sub populateInsuranceType()
Dim InsuranceTypes As InsuranceTypes
InsuranceTypes = oInsuranceType.loadInsuranceType
InsuranceTypeList.Items.Clear() 'checklist
For Each InsuranceType as insuranceType In...
You guys are great.
Like Steve said, I populated collection from the db and iterated through it to populate the checklistbox like korach suggested. However checklistbox displays all items as ProgramName.InsuranceType rather than insurance type names. What am I missing here?
Thanks again.
'User...
Thanks korach and stevexff for your valuable comments.
listcheckbox is good idea, didn't realize. :)
Like steve said, I have insurance types in the database.
And insurance class has enum type insurancetypes with the same value as in the database. Following korach's eg in the form load event...
A customer can have multiple insurances. So in user interface,
I have 4 checkboxes representing multiple insurance types.
If any box is checked, first I see if the checked insurance type
already exists in the collection before I create a new one. The following code works but is rather long when...
I need to know how to cascade identity key from parent table down to child tables. I have been doing it one way but almost all articles I've read suggest using datarelation to cascade identity key. However, in my code, I save one table a time (see below) and I am confused about how to create...
Here's the SavePatient routine that uses customer id as foreign key.
Any suggestions how I can create data relation b/w here and cascade
customer id to patient table? Thanks.
'client
opatient.SavePatient()
' Patient class
Public Function SavePatient(Optional ByVal bolStartTran...
I need to know how to cascade identity key from parent table down to child tables. I have been doing one way but most articles I've read suggest using datarelation to cascade identity key. However, in my code, I save one table a time (see below) and so I am confused about how to create relation...
Beck,
I cannot instantiate oledbtransaction because it shows
error when I try to.
I guess the reason it's bombing is because in
da.UpdateCommand.Transaction = Trans
da.InsertCommand.Transaction = Trans
da.DeleteCommand.Transaction = Trans
da.updatecommand, da.insertcommand and...
I am using dataAdapter to update records (add/delete/update). I want to use transactions
with dataAdapter to do updates. I am not sure how I can do it using dataAdapter. I have
following coded, is it going to work to insert/delete/update records to the database?
Public Function...
I am binding the collection to a Datagrid. I can bind to the collection successfully. I am using a tablestyle to limit the data the datagrid displays.
However, the tablestyle don't work. How can I make tablestyle to work for collections? another ques, what's the mapping name to be given for...
I am binding datagrid to collection (orequests) to display customer requests.
How do you format datagrid which has collection as datasource? what mapping name to use? i.e. oRequests.GetType.Name did not work. Currently, even though I want only selected fields contaied in collection objects to...
Suppose I have two tables: customers and orders. I created two class,
customer and orders.
tbl customer
-----------
custid
custname
tbl orders
----------
orderid
custid
orderName
orderAmt
I want to display customer orders in datagrid.
So, I created orders collection and binded...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.