Click here to Skip to main content
15,886,919 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralDatabase connection using Vb.net 2003 and MySQL 4.1 Pin
magesh2117-Apr-08 2:27
magesh2117-Apr-08 2:27 
GeneralRe: Database connection using Vb.net 2003 and MySQL 4.1 Pin
Dave Kreskowiak17-Apr-08 3:34
mveDave Kreskowiak17-Apr-08 3:34 
Generalcombo box invalid property array index Pin
kankeyan17-Apr-08 0:20
kankeyan17-Apr-08 0:20 
GeneralRe: combo box invalid property array index Pin
Luc Pattyn17-Apr-08 0:37
sitebuilderLuc Pattyn17-Apr-08 0:37 
GeneralRe: combo box invalid property array index Pin
kankeyan17-Apr-08 2:18
kankeyan17-Apr-08 2:18 
GeneralRe: combo box invalid property array index Pin
Luc Pattyn17-Apr-08 2:46
sitebuilderLuc Pattyn17-Apr-08 2:46 
QuestionSQL Timeout repeating a query Pin
Paul DAmbra16-Apr-08 22:51
Paul DAmbra16-Apr-08 22:51 
GeneralRe: SQL Timeout repeating a query Pin
Dave Kreskowiak17-Apr-08 3:30
mveDave Kreskowiak17-Apr-08 3:30 
First, are the dates stored in your database using DateTime types or strings?? If strings, you're in trouble...

Second, pass dates in your code AS Date objects, not strings. AddWithValue is probably the worst method you could use to add a paramter to an SQL query. It infers what the proper date type might be by looking at the type of the value your passing it. In your case, you passed the inputDate as a string to the AddWithValue parameter, which probably added the parameter to the SQL statement as an nvarchar(x), not an SQL DateTime. This might be where your SQL is hanging up.

How long does this query take to run in Query Analyzer?


A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007, 2008




GeneralRe: SQL Timeout repeating a query Pin
Vimalsoft(Pty) Ltd17-Apr-08 3:54
professionalVimalsoft(Pty) Ltd17-Apr-08 3:54 
Questionabout TableLayoutPanel control in vb.net 2.0 Pin
vijaylumar16-Apr-08 22:11
vijaylumar16-Apr-08 22:11 
GeneralRe: about TableLayoutPanel control in vb.net 2.0 Pin
Ajay.k_Singh17-Apr-08 1:10
Ajay.k_Singh17-Apr-08 1:10 
Question[Message Deleted] Pin
r_williams_8416-Apr-08 21:33
r_williams_8416-Apr-08 21:33 
GeneralRe: DLL Registration Pin
Dave Kreskowiak17-Apr-08 3:24
mveDave Kreskowiak17-Apr-08 3:24 
GeneralRe: DLL Registration Pin
r_williams_8417-Apr-08 13:00
r_williams_8417-Apr-08 13:00 
QuestionSecurity Policy Pin
Tauseef A16-Apr-08 19:25
Tauseef A16-Apr-08 19:25 
GeneralRe: Security Policy Pin
Dave Kreskowiak17-Apr-08 3:22
mveDave Kreskowiak17-Apr-08 3:22 
GeneralProblems updating database Pin
AAGTHosting16-Apr-08 9:49
AAGTHosting16-Apr-08 9:49 
GeneralRe: Problems updating database Pin
Dave Kreskowiak16-Apr-08 11:15
mveDave Kreskowiak16-Apr-08 11:15 
GeneralUsing SelectedItem to have pre select item in combo box Pin
AAGTHosting16-Apr-08 8:10
AAGTHosting16-Apr-08 8:10 
GeneralRe: Using SelectedItem to have pre select item in combo box Pin
Dave Kreskowiak16-Apr-08 8:38
mveDave Kreskowiak16-Apr-08 8:38 
QuestionModifying XML Nodes Pin
CocaColaBoy16-Apr-08 6:46
CocaColaBoy16-Apr-08 6:46 
GeneralRe: Modifying XML Nodes Pin
Dave Kreskowiak16-Apr-08 8:41
mveDave Kreskowiak16-Apr-08 8:41 
GeneralRe: Modifying XML Nodes Pin
CocaColaBoy16-Apr-08 8:52
CocaColaBoy16-Apr-08 8:52 
GeneralRe: Modifying XML Nodes Pin
Dave Kreskowiak16-Apr-08 9:23
mveDave Kreskowiak16-Apr-08 9:23 
GeneralRe: Modifying XML Nodes Pin
CocaColaBoy16-Apr-08 10:08
CocaColaBoy16-Apr-08 10:08 

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.