Click here to Skip to main content
15,887,683 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: WebBrowser Dock covers up statusstrip Pin
Dave Kreskowiak31-Jan-13 6:52
mveDave Kreskowiak31-Jan-13 6:52 
GeneralRe: WebBrowser Dock covers up statusstrip Pin
Eddy Vluggen31-Jan-13 10:12
professionalEddy Vluggen31-Jan-13 10:12 
GeneralRe: WebBrowser Dock covers up statusstrip Pin
NSoft Studios3-Feb-13 12:58
NSoft Studios3-Feb-13 12:58 
AnswerRe: WebBrowser Dock covers up statusstrip Pin
rohitvermasrt31-Jan-13 18:28
rohitvermasrt31-Jan-13 18:28 
QuestionQuery dataTable with .Compute Pin
mebjen30-Jan-13 9:05
mebjen30-Jan-13 9:05 
AnswerRe: Query dataTable with .Compute Pin
Dave Kreskowiak30-Jan-13 10:20
mveDave Kreskowiak30-Jan-13 10:20 
GeneralRe: Query dataTable with .Compute Pin
mebjen30-Jan-13 10:45
mebjen30-Jan-13 10:45 
GeneralRe: Query dataTable with .Compute Pin
Dave Kreskowiak30-Jan-13 14:28
mveDave Kreskowiak30-Jan-13 14:28 
You don't need to specify System. The System namespace is automatically imported in VB.NET. You also don't need to specify System.Type.GetType... GetType alone is sufficient.
Dim col_invDate As DataColumn = New DataColumn("invDate")
col_invDate.DataType = System.Type.GetType("System.DateTime")
salesTable.Columns.Add(col_invDate)

should become this:
Dim col_invDate As DataColumn = New DataColumn("invDate")
col_invDate.DataType = GetType(DateTime)
salesTable.Columns.Add(col_invDate)


Next, according to the documentation on DataTable.Compute and DataColumn.Expression, a DateTime value should be enclosed in single quotes or the # sign, depending on the underlying data provider.

...and to make things MUCH easier to read, don't use string concatentation:
x0 = yrSales.Compute("SUM(extPrice)", String.Format("shipToName = '{0}' AND invDate > #{1}# AND invDate < #{2}#", stn, begDate, endDate))


BTW: x0 is a terrible variable name. By looking at the variable name alone, what does it contain?? There is no way to tell.

QuestionWindows admin mode mistries Pin
solankinkdpr30-Jan-13 1:11
solankinkdpr30-Jan-13 1:11 
AnswerRe: Windows admin mode mistries Pin
Eddy Vluggen30-Jan-13 7:51
professionalEddy Vluggen30-Jan-13 7:51 
GeneralRe: Windows admin mode mistries Pin
solankinkdpr30-Jan-13 19:07
solankinkdpr30-Jan-13 19:07 
AnswerRe: Windows admin mode mistries Pin
Eddy Vluggen30-Jan-13 22:35
professionalEddy Vluggen30-Jan-13 22:35 
GeneralRe: Windows admin mode mistries Pin
solankinkdpr31-Jan-13 2:29
solankinkdpr31-Jan-13 2:29 
GeneralRe: Windows admin mode mistries Pin
Eddy Vluggen31-Jan-13 3:21
professionalEddy Vluggen31-Jan-13 3:21 
AnswerRe: Windows admin mode mistries Pin
Dave Kreskowiak30-Jan-13 8:26
mveDave Kreskowiak30-Jan-13 8:26 
Questionserial number with project Pin
olivertechy29-Jan-13 15:33
olivertechy29-Jan-13 15:33 
AnswerRe: serial number with project Pin
Eddy Vluggen30-Jan-13 8:17
professionalEddy Vluggen30-Jan-13 8:17 
QuestionParse XML Response String And Get Usable Variables Pin
pjgoodis29-Jan-13 4:46
pjgoodis29-Jan-13 4:46 
AnswerRe: Parse XML Response String And Get Usable Variables Pin
Alan N29-Jan-13 6:05
Alan N29-Jan-13 6:05 
GeneralRe: Parse XML Response String And Get Usable Variables Pin
pjgoodis29-Jan-13 22:05
pjgoodis29-Jan-13 22:05 
QuestionMicrosoft ReportViewer Pin
IgaBaro28-Jan-13 16:30
IgaBaro28-Jan-13 16:30 
AnswerRe: Microsoft ReportViewer Pin
IgaBaro29-Jan-13 15:28
IgaBaro29-Jan-13 15:28 
QuestionHow to detect a Mobile device name Pin
MoDy kareem28-Jan-13 3:55
MoDy kareem28-Jan-13 3:55 
QuestionPLZ any one tell me the program to open an exe file with parallel port using visual basic Pin
kspcr26-Jan-13 0:20
kspcr26-Jan-13 0:20 
SuggestionRe: PLZ any one tell me the program to open an exe file with parallel port using visual basic Pin
Richard MacCutchan26-Jan-13 1:25
mveRichard MacCutchan26-Jan-13 1:25 

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.