Click here to Skip to main content
15,909,591 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: NumericUpDown that updates as you type Pin
Marcus J. Smith25-May-07 6:21
professionalMarcus J. Smith25-May-07 6:21 
GeneralRe: NumericUpDown that updates as you type Pin
frobozzdamad29-May-07 4:21
frobozzdamad29-May-07 4:21 
GeneralRe: NumericUpDown that updates as you type [modified] Pin
Marcus J. Smith29-May-07 4:54
professionalMarcus J. Smith29-May-07 4:54 
Questionhow to work with datagrid? Pin
sathyan_829425-May-07 5:08
sathyan_829425-May-07 5:08 
AnswerRe: how to work with datagrid? Pin
Marcus J. Smith25-May-07 6:19
professionalMarcus J. Smith25-May-07 6:19 
GeneralRe: how to work with datagrid? Pin
Flame11325-May-07 14:52
Flame11325-May-07 14:52 
Questionhow to work with datagrid? Pin
sathyan_829425-May-07 5:07
sathyan_829425-May-07 5:07 
QuestionFinding the Text value of a column... Pin
CCG325-May-07 4:39
CCG325-May-07 4:39 
Hello all, I creating a Temp DataSet and Adapter, populating it and then doing an Insert to move data from this table back into the orginial table I copied it from but with a new DATE. I have it all working fine so far but when I get to trying to list the value of one of my columns (the most inportant one) I can't seem to grab the value. Below is what I have as of now. The line that I am having a problem with is OrderName = ADS.Orders.Select.ToString but I wanted to show you exactly what I am doing. Does anyone have any suggestions? Thank you for any help that you can provide...

Dim NewVisitDate As String
Dim PriorVisitDate As String
Dim SQL As String = String.Empty


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

'create SQL to filter out data
SQL = "SELECT OrderMR, OrderDate,Order FROM (Orders) WHERE (OrderMR='" & MR & "') and (OrderDate= #" & PriorVisitDate & "#)"


'create new DataSet and new DataAdapter
Dim dr As OleDbDataReader
Dim ADS As New AnesDataSet
Dim CopyOrders As New OleDbDataAdapter(SQL, Connection)

CopyOrders.Fill(ADS, "Orders")
'CopyOrders.Fill(ADS.Orders)

Try

Connection.Open()
Dim Command As New OleDbCommand(SQL, Connection)
dr = Command.ExecuteReader()


Catch ex As Exception

End Try


'run a ForEach statement to modify all of the records in the ADS.Orders table
Dim Row As DataRow
Dim OrderName As String
Dim SQLInsert As String = String.Empty


For Each Row In ADS.Orders.Rows

OrderName = ADS.Orders.Select.ToString


'setup an SQL to change the Date and Insert new records
SQLInsert = "INSERT INTO Orders (OrderMR, OrderDate, [Order]) VALUES (@MR, @NewVisitDate,@OrderName)"


Dim Command_Insert As New OleDbCommand(SQLInsert, Connection)

Command_Insert.Parameters.AddWithValue("@orderMR", MR)
Command_Insert.Parameters.AddWithValue("@OrderDate", NewVisitDate)
Command_Insert.Parameters.AddWithValue("@Order", OrderName)

Command_Insert.ExecuteNonQuery()
'Console.Write(Command_Insert)


AnswerRe: Finding the Text value of a column... Pin
Marcus J. Smith25-May-07 6:24
professionalMarcus J. Smith25-May-07 6:24 
GeneralRe: Finding the Text value of a column... Pin
CCG325-May-07 6:38
CCG325-May-07 6:38 
GeneralRe: Finding the Text value of a column... Pin
Marcus J. Smith25-May-07 7:53
professionalMarcus J. Smith25-May-07 7:53 
GeneralRe: Finding the Text value of a column... Pin
CCG325-May-07 8:04
CCG325-May-07 8:04 
QuestionStringBuilder huge string concatenation Pin
K.P.Kannan25-May-07 4:18
K.P.Kannan25-May-07 4:18 
AnswerRe: StringBuilder huge string concatenation Pin
Marcus J. Smith25-May-07 6:28
professionalMarcus J. Smith25-May-07 6:28 
Questioncan't update Pin
sathyan_829425-May-07 4:16
sathyan_829425-May-07 4:16 
AnswerRe: can't update Pin
Kschuler25-May-07 7:39
Kschuler25-May-07 7:39 
AnswerRe: can't update Pin
advansis25-May-07 8:26
advansis25-May-07 8:26 
QuestionIs this legal? Pin
Zaegra25-May-07 4:11
Zaegra25-May-07 4:11 
AnswerRe: Is this legal? Pin
Johan Hakkesteegt28-May-07 2:06
Johan Hakkesteegt28-May-07 2:06 
Questionconvert vb to .net Pin
koolprasad200325-May-07 3:20
professionalkoolprasad200325-May-07 3:20 
AnswerRe: convert vb to .net Pin
Dave Kreskowiak25-May-07 3:34
mveDave Kreskowiak25-May-07 3:34 
QuestionSetting a DataSet's Primary Key Pin
Quecumber25625-May-07 3:05
Quecumber25625-May-07 3:05 
QuestionManipulating options in Outlook using DoCmd.SendObject [modified] Pin
reegan4125-May-07 2:37
reegan4125-May-07 2:37 
QuestionTab Controls question Pin
reegan4125-May-07 2:29
reegan4125-May-07 2:29 
QuestionCrystal Report on Basis of Dataset having multiple tables Pin
Syed Ali Raza25-May-07 2:26
Syed Ali Raza25-May-07 2:26 

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.