Click here to Skip to main content
15,922,696 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: help running project Pin
Nick Seng25-May-04 19:48
Nick Seng25-May-04 19:48 
GeneralRe: help running project Pin
ps1k027-May-04 2:35
ps1k027-May-04 2:35 
QuestionHow can I use string SQL to search or compare DateTime correctly? Pin
ATC25-May-04 17:04
ATC25-May-04 17:04 
AnswerRe: How can I use string SQL to search or compare DateTime correctly? Pin
Dave Kreskowiak25-May-04 17:45
mveDave Kreskowiak25-May-04 17:45 
GeneralRe: How can I use string SQL to search or compare DateTime correctly? Pin
Charlie Williams25-May-04 18:12
Charlie Williams25-May-04 18:12 
GeneralRe: How can I use string SQL to search or compare DateTime correctly? Pin
Dave Kreskowiak26-May-04 0:32
mveDave Kreskowiak26-May-04 0:32 
GeneralRe: How can I use string SQL to search or compare DateTime correctly? Pin
ATC26-May-04 11:15
ATC26-May-04 11:15 
GeneralRe: How can I use string SQL to search or compare DateTime correctly? Pin
Dave Kreskowiak26-May-04 16:22
mveDave Kreskowiak26-May-04 16:22 
You didn't say it was an Access database, but the idea is identical to an SQL Server version. This is an example based on the query you supplied in your first post:
    Public Shared Function GetOleDBDataReader(ByVal searchDate As Date) As OleDbDataReader
        Dim oleConnection As New OleDbConnection("connectionString")
 
        Dim oleCommand As New OleDbCommand("storedProcedureName", oleConnection)
        oleCommand.CommandType = CommandType.StoredProcedure
 
        ' or you could use this if the SQL statemnet is not in a stored procedure:
        'Dim oleCommand As New OleDbCommand
        'oleCommand.CommandText = "SELECT * FROM Invoice WHERE InvoiceDT >= ?"
        'oleCommand.CommandType = CommandType.Text
        'oleCommand.Connection = oleConnection
 
        ' OleDbType depends on the column definition in the database.
        ' Using this method, you don't have to worry about the proper date format.
        Dim sqlDateParam As New OleDbParameter("@DateToSearchFor", OleDbType.Date)
        sqlDateParam.Value = searchDate
        sqlDateParam.Direction = ParameterDirection.Output
        oleCommand.Parameters.Add(sqlDateParam)
 
        oleConnection.Open()
        Return oleCommand.ExecuteReader(CommandBehavior.CloseConnection)
    End Function


RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome

GeneralAny one knows the better way to connecting to Oracle DB. Pin
jlizardo25-May-04 10:39
jlizardo25-May-04 10:39 
GeneralRe: Any one knows the better way to connecting to Oracle DB. Pin
Dave Kreskowiak25-May-04 11:36
mveDave Kreskowiak25-May-04 11:36 
QuestionHow do I perform a 2's Complement Sum in VB.Net Pin
DudleyDoorite25-May-04 9:54
DudleyDoorite25-May-04 9:54 
Generaltrying to hide certain columns in a datagrid Pin
kowplunk25-May-04 7:56
kowplunk25-May-04 7:56 
GeneralRe: trying to hide certain columns in a datagrid Pin
Nick Seng25-May-04 15:45
Nick Seng25-May-04 15:45 
GeneralRe: trying to hide certain columns in a datagrid Pin
kowplunk26-May-04 4:21
kowplunk26-May-04 4:21 
GeneralRe: trying to hide certain columns in a datagrid Pin
Nick Seng26-May-04 15:19
Nick Seng26-May-04 15:19 
GeneralConverting MS Access Data Type Pin
MicSky25-May-04 4:20
MicSky25-May-04 4:20 
GeneralRe: Converting MS Access Data Type Pin
mikasa25-May-04 4:22
mikasa25-May-04 4:22 
QuestionDeploying a VB.Net application with third party dlls? Pin
palei25-May-04 1:31
palei25-May-04 1:31 
AnswerRe: Deploying a VB.Net application with third party dlls? Pin
Sarvesvara (BVKS) Dasa26-May-04 7:37
Sarvesvara (BVKS) Dasa26-May-04 7:37 
GeneralUsercontrols on Panes Pin
emari25-May-04 1:00
emari25-May-04 1:00 
GeneralRe: Usercontrols on Panes Pin
Dave Kreskowiak25-May-04 2:09
mveDave Kreskowiak25-May-04 2:09 
GeneralRe: Usercontrols on Panes Pin
Member 85737725-May-04 8:56
Member 85737725-May-04 8:56 
GeneralRe: Usercontrols on Panes Pin
Dave Kreskowiak25-May-04 11:14
mveDave Kreskowiak25-May-04 11:14 
GeneralRe: Usercontrols on Panes Pin
emari25-May-04 22:02
emari25-May-04 22:02 
GeneralRe: Usercontrols on Panes Pin
Member 85737725-May-04 9:24
Member 85737725-May-04 9:24 

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.