Click here to Skip to main content
15,894,316 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionOverlapping screens Pin
yera200215-Jun-10 7:07
yera200215-Jun-10 7:07 
AnswerRe: Overlapping screens Pin
Luc Pattyn15-Jun-10 7:26
sitebuilderLuc Pattyn15-Jun-10 7:26 
GeneralRe: Overlapping screens Pin
Wayne Gaylard15-Jun-10 15:45
professionalWayne Gaylard15-Jun-10 15:45 
GeneralRe: Overlapping screens Pin
Luc Pattyn15-Jun-10 16:06
sitebuilderLuc Pattyn15-Jun-10 16:06 
AnswerRe: Overlapping screens Pin
programmervb.netc++15-Jun-10 19:29
programmervb.netc++15-Jun-10 19:29 
QuestionMaskedTextBox -Date Problem() Pin
Paramu197315-Jun-10 5:00
Paramu197315-Jun-10 5:00 
AnswerRe: MaskedTextBox -Date Problem() Pin
Henry Minute15-Jun-10 6:33
Henry Minute15-Jun-10 6:33 
AnswerRe: MaskedTextBox -Date Problem() Pin
Geoff Williams15-Jun-10 7:09
Geoff Williams15-Jun-10 7:09 
I'm not sure the problem is to do with the string concatenation. In my experience, the VB.NET compiler will automatically invoke the ToString() method whenever a non-string variable is included in a string concatenation.

It is far more likely that it is how you are including the DateTime variable in the query parameter of the Compute() method. In both Microsoft Access and Microsoft SQL Server, including a date in a query string requires wrapping the date in # characters, not ' characters.

Try changing your query to:

Dim GnQy As Object = MyDs.Tables(0).Compute("sum(grn_qty)", "itm_code='" & ThsImCd & "' and grn_date<=#" & Dt2 & "#")


I have also bolded my changes.
AnswerRe: MaskedTextBox -Date Problem() Pin
Luc Pattyn15-Jun-10 8:03
sitebuilderLuc Pattyn15-Jun-10 8:03 
QuestionComboboxes and commas Pin
Rich Leyshon15-Jun-10 0:04
Rich Leyshon15-Jun-10 0:04 
AnswerRe: Comboboxes and commas Pin
Tom Deketelaere15-Jun-10 0:18
professionalTom Deketelaere15-Jun-10 0:18 
GeneralRe: Comboboxes and commas Pin
Rich Leyshon15-Jun-10 0:36
Rich Leyshon15-Jun-10 0:36 
GeneralRe: Comboboxes and commas Pin
Luc Pattyn15-Jun-10 1:13
sitebuilderLuc Pattyn15-Jun-10 1:13 
GeneralRe: Comboboxes and commas Pin
Rich Leyshon15-Jun-10 1:16
Rich Leyshon15-Jun-10 1:16 
GeneralRe: Comboboxes and commas Pin
Luc Pattyn15-Jun-10 1:42
sitebuilderLuc Pattyn15-Jun-10 1:42 
GeneralRe: Comboboxes and commas Pin
Rich Leyshon15-Jun-10 2:11
Rich Leyshon15-Jun-10 2:11 
GeneralRe: Comboboxes and commas Pin
Luc Pattyn15-Jun-10 2:18
sitebuilderLuc Pattyn15-Jun-10 2:18 
GeneralRe: Comboboxes and commas Pin
Rich Leyshon15-Jun-10 2:26
Rich Leyshon15-Jun-10 2:26 
AnswerUNBELIEVEABLE! Pin
Rich Leyshon15-Jun-10 8:31
Rich Leyshon15-Jun-10 8:31 
GeneralRe: UNBELIEVEABLE! Pin
Luc Pattyn15-Jun-10 9:10
sitebuilderLuc Pattyn15-Jun-10 9:10 
GeneralRe: UNBELIEVEABLE! [modified] Pin
Rich Leyshon15-Jun-10 22:10
Rich Leyshon15-Jun-10 22:10 
GeneralRe: UNBELIEVEABLE! Pin
Luc Pattyn16-Jun-10 1:27
sitebuilderLuc Pattyn16-Jun-10 1:27 
GeneralRe: UNBELIEVEABLE! Pin
Rich Leyshon16-Jun-10 1:54
Rich Leyshon16-Jun-10 1:54 
Generalsolution Pin
Luc Pattyn16-Jun-10 2:20
sitebuilderLuc Pattyn16-Jun-10 2:20 
GeneralRe: solution Pin
Rich Leyshon16-Jun-10 3:42
Rich Leyshon16-Jun-10 3:42 

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.