Click here to Skip to main content
15,891,136 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Newby question - entering persistant/static/configuration data Pin
Dave Kreskowiak23-May-07 16:11
mveDave Kreskowiak23-May-07 16:11 
AnswerRe: Newby question - entering persistant/static/configuration data Pin
Dave Herren23-May-07 16:21
Dave Herren23-May-07 16:21 
GeneralRe: Newby question - entering persistant/static/configuration data Pin
>Bill23-May-07 16:40
>Bill23-May-07 16:40 
QuestionCopy records, change date, save new... Pin
CCG323-May-07 9:31
CCG323-May-07 9:31 
AnswerRe: Copy records, change date, save new... Pin
Dave Kreskowiak23-May-07 9:56
mveDave Kreskowiak23-May-07 9:56 
GeneralRe: Copy records, change date, save new... [modified] Pin
CCG323-May-07 10:06
CCG323-May-07 10:06 
GeneralRe: Copy records, change date, save new... Pin
Dave Kreskowiak23-May-07 10:15
mveDave Kreskowiak23-May-07 10:15 
GeneralRe: Copy records, change date, save new... Pin
CCG323-May-07 10:39
CCG323-May-07 10:39 
Ok this is what I have so far I am trying to create a temp table and pull data into it....

Dim NewVisitDate As Date
Dim PriorVisitDate As Date
Dim SQL As String = String.Empty
Dim DT As New DataTable("TempVisitTable")

'set Variables
NewVisitDate = txtVisitDate.Text
PriorVisitDate = Me.cbobxPriorDates.Text.ToString
MR = frmQuestionnaire.txtMRNo.Text

'

SQL = "SELECT OrderMR, OrderDate, [Order] FROM (Orders) WHERE (OrderMR='" & MR & "') and (OrderDate= #" & PriorVisitDate & "#)"


Try

Connection.Open()
Dim Command As New OleDbCommand(SQL, Connection)
Command.ExecuteReader()
DT.Load(SQL)

Catch ex As Exception

End Try

When I do this I get a message on the DT.Load(SQL) that says...Unable to cast object of type 'System.String' to type 'System.Data.IDataReader'.

I am sure this is a syntax problem. Can someone tell me what I am doing wrong here?
GeneralRe: Copy records, change date, save new... Pin
Dave Kreskowiak23-May-07 16:06
mveDave Kreskowiak23-May-07 16:06 
QuestionHow to sort on date Pin
skipy197323-May-07 9:10
skipy197323-May-07 9:10 
AnswerRe: How to sort on date Pin
Dave Kreskowiak23-May-07 9:51
mveDave Kreskowiak23-May-07 9:51 
GeneralRe: How to sort on date Pin
skipy197323-May-07 11:04
skipy197323-May-07 11:04 
QuestionPlease help with a simple SAPI 5.1 code (MS Speech Recognition).. Pin
RoyZ77723-May-07 8:21
RoyZ77723-May-07 8:21 
AnswerRe: Please help with a simple SAPI 5.1 code (MS Speech Recognition).. Pin
Dave Kreskowiak23-May-07 8:39
mveDave Kreskowiak23-May-07 8:39 
GeneralRe: Please help with a simple SAPI 5.1 code (MS Speech Recognition).. Pin
RoyZ77723-May-07 12:12
RoyZ77723-May-07 12:12 
GeneralRe: Please help with a simple SAPI 5.1 code (MS Speech Recognition).. Pin
Dave Kreskowiak23-May-07 16:08
mveDave Kreskowiak23-May-07 16:08 
GeneralRe: Please help with a simple SAPI 5.1 code (MS Speech Recognition).. [modified] Pin
RoyZ77723-May-07 23:28
RoyZ77723-May-07 23:28 
GeneralRe: Please help with a simple SAPI 5.1 code (MS Speech Recognition).. Pin
Dave Kreskowiak24-May-07 4:27
mveDave Kreskowiak24-May-07 4:27 
GeneralRe: Please help with a simple SAPI 5.1 code (MS Speech Recognition).. Pin
RoyZ77724-May-07 5:39
RoyZ77724-May-07 5:39 
GeneralRe: Please help with a simple SAPI 5.1 code (MS Speech Recognition).. Pin
RoyZ77724-May-07 13:09
RoyZ77724-May-07 13:09 
AnswerRe: Please help with a simple SAPI 5.1 code (MS Speech Recognition).. Pin
Dave Herren23-May-07 16:06
Dave Herren23-May-07 16:06 
GeneralRe: Please help with a simple SAPI 5.1 code (MS Speech Recognition).. [modified] Pin
RoyZ77724-May-07 1:53
RoyZ77724-May-07 1:53 
GeneralRe: Please help with a simple SAPI 5.1 code (MS Speech Recognition).. Pin
Dave Herren24-May-07 9:48
Dave Herren24-May-07 9:48 
GeneralRe: Please help with a simple SAPI 5.1 code (MS Speech Recognition).. Pin
RoyZ77724-May-07 13:08
RoyZ77724-May-07 13:08 
QuestionSage Accounts and vb.net Pin
franjones23-May-07 8:09
franjones23-May-07 8:09 

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.