data grid updating - date field throwing me for a loop
From: BethF (dawg_at_alaskaSPAMFREE.com)
Date: 03/11/04
- Next message: Abhijeet Dev: "Re: Why do texboxes in the main body of a form act differently to postback than textboxes in a repeater on the form?"
- Previous message: Levi Rosol: "Re: IIS caching output of pages"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 11 Mar 2004 12:38:33 -0900
I think the ctype is converting my date to a string, and therefore screwing
up my dates in the following code. Please send suggestions!
Sub Update_Grid(sender as object, e as datagridcommandeventargs)
theid = e.item.cells(7).text
lastname = ctype(e.item.cells(0).controls(0),textbox).text
firstname = ctype(e.item.cells(1).controls(0),textbox).text
extension = ctype(e.item.cells(2).controls(0),textbox).text
emailaddress = ctype(e.item.cells(3).controls(0),textbox).text
home = ctype(e.item.cells(4).controls(0),textbox).text
cell = ctype(e.item.cells(5).controls(0),textbox).text
birthday = ctype(e.item.cells(6).controls(0),textbox).text
DBupdate.commandtext= "update tblapcausers " _
& "set firstname= '" & firstname & "', " _
& "lastname= '" & lastname & "', " _
& "extension = '" & extension & "', " _
& "emailaddress = '" & emailaddress & "', " _
& "homephone = '" & home & "', " _
& "cellphone = '" & cell & "', " _
& "birthday = " & birthday & " WHERE userid = " & theid
dbupdate.connection = dbconn
dbupdate.connection.open
dbupdate.executenonquery()
dbconn.close
dgcontactlist.edititemindex = -1
builddatalist
End Sub
- Next message: Abhijeet Dev: "Re: Why do texboxes in the main body of a form act differently to postback than textboxes in a repeater on the form?"
- Previous message: Levi Rosol: "Re: IIS caching output of pages"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|