Click here to Skip to main content
16,006,348 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: save images into access Pin
Michael Sync1-Jan-08 1:10
Michael Sync1-Jan-08 1:10 
GeneralDHTMLEdit control Pin
King of Kingz31-Dec-07 23:23
King of Kingz31-Dec-07 23:23 
GeneralRe: DHTMLEdit control Pin
Dave Kreskowiak1-Jan-08 11:08
mveDave Kreskowiak1-Jan-08 11:08 
GeneralRe: DHTMLEdit control Pin
King of Kingz3-Jan-08 18:41
King of Kingz3-Jan-08 18:41 
GeneralRe: DHTMLEdit control Pin
Dave Kreskowiak4-Jan-08 1:45
mveDave Kreskowiak4-Jan-08 1:45 
GeneralRe: DHTMLEdit control Pin
King of Kingz6-Jan-08 20:58
King of Kingz6-Jan-08 20:58 
GeneralSQL query Pin
Amanjot31-Dec-07 7:05
Amanjot31-Dec-07 7:05 
GeneralRe: SQL query Pin
Dave Kreskowiak31-Dec-07 9:08
mveDave Kreskowiak31-Dec-07 9:08 
You have multiple problems with this. The first is that your SQL statement is wrong. The WHERE clause is comparing your first date with the second, and alway socmming up with True, so that's why you're getting every record in the table instead of a range of them. You should be comparing the field in the table you want to those two dates, not the two dates to each other.

Second, dates in Access must be wrapped in # characters. You don't have any of those in your SQL string, so the dates are not even valid, no matter what they look like.

Lastly, you're using string concantenation to build the SQL query. This has numerous problems with it as dates in strings can be in many different formats and that might not match the date format Access is using. Use parameterized queries instead. Read this[^] for an explanation of why concantenating strings together to build your SQL statements is a bad thing, and how to use parameterized queries to eliminate some of the problems you're having passing dates into the SQL.



A guide to posting questions on CodeProject[^]



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




QuestionRegistry Key Enumeration Pin
andyr200531-Dec-07 5:31
andyr200531-Dec-07 5:31 
GeneralRe: Registry Key Enumeration Pin
DigiOz Multimedia31-Dec-07 6:30
DigiOz Multimedia31-Dec-07 6:30 
GeneralVB.net - Checking for the instance of a control Pin
pkrvb30-Dec-07 23:20
pkrvb30-Dec-07 23:20 
QuestionRe: VB.net - Checking for the instance of a control Pin
CPallini30-Dec-07 23:42
mveCPallini30-Dec-07 23:42 
GeneralRe: VB.net - Checking for the instance of a control Pin
Dave Kreskowiak31-Dec-07 3:56
mveDave Kreskowiak31-Dec-07 3:56 
GeneralType Load Exception Pin
Nagarajan R.J30-Dec-07 21:23
Nagarajan R.J30-Dec-07 21:23 
GeneralRe: Type Load Exception Pin
Dave Kreskowiak31-Dec-07 3:57
mveDave Kreskowiak31-Dec-07 3:57 
QuestionHow to design a form for finding or searching a data from the database in VB.NET? Pin
S.SRIVATHSAN30-Dec-07 18:46
S.SRIVATHSAN30-Dec-07 18:46 
AnswerRe: How to design a form for finding or searching a data from the database in VB.NET? Pin
Michael Sync30-Dec-07 18:55
Michael Sync30-Dec-07 18:55 
AnswerRe: How to design a form for finding or searching a data from the database in VB.NET? Pin
Vimalsoft(Pty) Ltd1-Jan-08 3:09
professionalVimalsoft(Pty) Ltd1-Jan-08 3:09 
Questionneed help getting the value from a selected row in DataGridView Pin
Shimmy Weitzhandler30-Dec-07 14:17
Shimmy Weitzhandler30-Dec-07 14:17 
GeneralRe: need help getting the value from a selected row in DataGridView Pin
nishkarsh_k30-Dec-07 18:34
nishkarsh_k30-Dec-07 18:34 
QuestionNeed help with DataGridView Control in VB6 Pin
brettfk101030-Dec-07 1:51
brettfk101030-Dec-07 1:51 
GeneralRe: Need help with DataGridView Control in VB6 Pin
Dave Kreskowiak31-Dec-07 4:01
mveDave Kreskowiak31-Dec-07 4:01 
GeneralRe: Need help with DataGridView Control in VB6 Pin
brettfk101031-Dec-07 11:29
brettfk101031-Dec-07 11:29 
QuestionHow to pivot a DataGrid Pin
VB.Net Developer29-Dec-07 21:40
VB.Net Developer29-Dec-07 21:40 
AnswerRe: How to pivot a DataGrid Pin
Michael Sync29-Dec-07 22:11
Michael Sync29-Dec-07 22:11 

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.