Click here to Skip to main content
15,921,840 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: format date Pin
Marcus J. Smith23-Feb-07 8:57
professionalMarcus J. Smith23-Feb-07 8:57 
AnswerRe: format date Pin
Marcus J. Smith23-Feb-07 9:01
professionalMarcus J. Smith23-Feb-07 9:01 
GeneralRe: format date Pin
jds120723-Feb-07 9:10
jds120723-Feb-07 9:10 
GeneralRe: format date Pin
Marcus J. Smith23-Feb-07 9:16
professionalMarcus J. Smith23-Feb-07 9:16 
GeneralRe: format date Pin
jds120723-Feb-07 9:19
jds120723-Feb-07 9:19 
GeneralRe: format date Pin
Marcus J. Smith23-Feb-07 9:26
professionalMarcus J. Smith23-Feb-07 9:26 
GeneralRe: format date Pin
jds120723-Feb-07 9:53
jds120723-Feb-07 9:53 
GeneralRe: format date Pin
Marcus J. Smith23-Feb-07 10:04
professionalMarcus J. Smith23-Feb-07 10:04 
Try a Parameterized statement, search Google for Parameterized Query. There you would setup your statement like the following.

Dim MyCommand As New Odbc.OdbcCommand("INSERT INTO ls_orderitems (OrderDate, OrderCustomer, OrderAcctNum, OrderType, OrderSoNum, OrderItemPartNum, OrderItemPartDesc, OrderItemQty, OrderItemQtyRec, OrderItemQtyDtRec, OrderItemBO, OrderItemBODt,OrderItemCanceled, OrderItemCanceledDt, OrderItemNotes, OrderItemPONum, OrderItemRetailPrice, OrderItemSalePrice, Status, InsertDate) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ,?, ?, ?, ?, ?)<br />
<br />
If OrderDate.Trim <> "" Then<br />
MyCommand.Parameters.Add("@OrderDate", CDate(OrderDate))<br />
Else<br />
MyCommand.Parameters.Add("@OrderDate", DBNull.Value)<br />
End If


Repeat the above for all dates and for the rest just use the line inside the If part.

CleAkO

GeneralRe: format date Pin
Dave Kreskowiak23-Feb-07 10:27
mveDave Kreskowiak23-Feb-07 10:27 
QuestionCaret Size Pin
Anybloodyid23-Feb-07 7:54
Anybloodyid23-Feb-07 7:54 
AnswerRe: Caret Size Pin
Dave Kreskowiak23-Feb-07 10:25
mveDave Kreskowiak23-Feb-07 10:25 
AnswerRe: Caret Size [modified] Pin
TwoFaced23-Feb-07 11:32
TwoFaced23-Feb-07 11:32 
GeneralRe: Caret Size Pin
Dave Kreskowiak23-Feb-07 14:02
mveDave Kreskowiak23-Feb-07 14:02 
GeneralRe: Caret Size Pin
TwoFaced23-Feb-07 14:31
TwoFaced23-Feb-07 14:31 
GeneralRe: Caret Size Pin
Anybloodyid23-Feb-07 22:53
Anybloodyid23-Feb-07 22:53 
GeneralRe: Caret Size Pin
TwoFaced23-Feb-07 23:51
TwoFaced23-Feb-07 23:51 
GeneralRe: Caret Size Pin
Anybloodyid24-Feb-07 1:22
Anybloodyid24-Feb-07 1:22 
GeneralRe: Caret Size Pin
TwoFaced24-Feb-07 8:28
TwoFaced24-Feb-07 8:28 
GeneralRe: Caret Size Pin
Anybloodyid24-Feb-07 9:42
Anybloodyid24-Feb-07 9:42 
GeneralRe: Caret Size Pin
TwoFaced24-Feb-07 10:14
TwoFaced24-Feb-07 10:14 
GeneralRe: Caret Size Pin
Anybloodyid24-Feb-07 11:11
Anybloodyid24-Feb-07 11:11 
GeneralRe: Caret Size Pin
TwoFaced24-Feb-07 12:54
TwoFaced24-Feb-07 12:54 
GeneralRe: Caret Size Pin
Anybloodyid24-Feb-07 22:47
Anybloodyid24-Feb-07 22:47 
GeneralRe: Caret Size Pin
TwoFaced24-Feb-07 23:17
TwoFaced24-Feb-07 23:17 
GeneralRe: Caret Size Pin
Anybloodyid25-Feb-07 0:50
Anybloodyid25-Feb-07 0:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.