Click here to Skip to main content
15,887,683 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Create Pdf Viewer disable SaveAs option Pin
Eddy Vluggen5-Feb-12 0:17
professionalEddy Vluggen5-Feb-12 0:17 
QuestionCreate Pdf Viewer Pin
Arul Suman4-Feb-12 23:22
Arul Suman4-Feb-12 23:22 
AnswerRe: Create Pdf Viewer Pin
Abhinav S4-Feb-12 23:42
Abhinav S4-Feb-12 23:42 
GeneralRe: Create Pdf Viewer Pin
Arul Suman4-Feb-12 23:52
Arul Suman4-Feb-12 23:52 
GeneralRe: Create Pdf Viewer Pin
Eddy Vluggen5-Feb-12 0:18
professionalEddy Vluggen5-Feb-12 0:18 
GeneralRe: Create Pdf Viewer Pin
Arul Suman5-Feb-12 0:51
Arul Suman5-Feb-12 0:51 
GeneralRe: Create Pdf Viewer Pin
Eddy Vluggen5-Feb-12 0:56
professionalEddy Vluggen5-Feb-12 0:56 
QuestionNewby to ADO.NET needs help upgrading from VB6 recordset update batch Pin
Member 86051774-Feb-12 5:51
Member 86051774-Feb-12 5:51 
I'm converting an old VB6 application to VB2010 and I've run across a situation I can't seem to figure out from the books I have and web posts so your help will be appreciated.

The problem is iterating through a recordset assigning values to 20+ fields and then doing an update batch.

So far all I've been able to figure out is to use an OleDBCommand class and ExecuteNonQuery method and create individual UPDATE SQL commands for each of the 20+ fields I'm dealing with. I'm hoping there is a simpler way similar to the old ADO UpdateBatch.

Here's sort of what my old VB6 code looks like:
Set Conn = New ADODB.Connection
Conn.Open strDSNName
Set rs = New ADODB.Recordset
gstrSQL = "SELECT * from Judges;"
Set rs.ActiveConnection = Conn
rs.CursorLocation = adUseClient
rs.CursorType = adOpenStatic
rs.LockType = adLockBatchOptimistic

rs.Open strSQL
Conn.Close
Set Conn = Nothing

rs.MoveFirst
Do Until rs.EOF
    rs.Fields("Response3").Value = rs.Fields("Response2").Value
    rs.Fields("AssignedCat3").Value = rs.Fields("AssignedCat2").Value
    ...
20 more lines setting field3 to field2
...
    rs.MoveNext
Loop
Set Conn = New ADODB.Connection
Conn.Open strDSNName
rs.ActiveConnection = Conn
rs.UpdateBatch
rs.close
set rs = nothing
conn.close
set conn.close


Thanks
AnswerRe: Newby to ADO.NET needs help upgrading from VB6 recordset update batch Pin
Eddy Vluggen5-Feb-12 6:05
professionalEddy Vluggen5-Feb-12 6:05 
GeneralRe: Newby to ADO.NET needs help upgrading from VB6 recordset update batch Pin
Member 86051775-Feb-12 6:50
Member 86051775-Feb-12 6:50 
AnswerRe: Newby to ADO.NET needs help upgrading from VB6 recordset update batch Pin
Eddy Vluggen5-Feb-12 7:19
professionalEddy Vluggen5-Feb-12 7:19 
GeneralRe: Newby to ADO.NET needs help upgrading from VB6 recordset update batch Pin
Member 86051775-Feb-12 11:03
Member 86051775-Feb-12 11:03 
GeneralRe: Newby to ADO.NET needs help upgrading from VB6 recordset update batch Pin
Eddy Vluggen5-Feb-12 19:45
professionalEddy Vluggen5-Feb-12 19:45 
QuestionDataReader with SQL Join Pin
C#Coudou2-Feb-12 19:51
C#Coudou2-Feb-12 19:51 
AnswerRe: DataReader with SQL Join Pin
Wayne Gaylard2-Feb-12 20:26
professionalWayne Gaylard2-Feb-12 20:26 
GeneralRe: DataReader with SQL Join Pin
C#Coudou2-Feb-12 21:13
C#Coudou2-Feb-12 21:13 
GeneralRe: DataReader with SQL Join Pin
Simon_Whale2-Feb-12 21:54
Simon_Whale2-Feb-12 21:54 
GeneralRe: DataReader with SQL Join Pin
C#Coudou2-Feb-12 21:57
C#Coudou2-Feb-12 21:57 
GeneralRe: DataReader with SQL Join Pin
Wayne Gaylard2-Feb-12 22:13
professionalWayne Gaylard2-Feb-12 22:13 
AnswerRe: DataReader with SQL Join Pin
Johan Hakkesteegt2-Feb-12 23:35
Johan Hakkesteegt2-Feb-12 23:35 
AnswerRe: DataReader with SQL Join Pin
Dave Kreskowiak3-Feb-12 2:28
mveDave Kreskowiak3-Feb-12 2:28 
Questionvb.net Pin
Member 82843502-Feb-12 18:58
Member 82843502-Feb-12 18:58 
AnswerRe: vb.net Pin
Simon_Whale2-Feb-12 21:50
Simon_Whale2-Feb-12 21:50 
AnswerRe: vb.net Pin
Eddy Vluggen3-Feb-12 0:22
professionalEddy Vluggen3-Feb-12 0:22 
QuestionCopy Content from Word Docuemnt to RichBox Pin
Peace4all2-Feb-12 17:50
Peace4all2-Feb-12 17:50 

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.