Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

ODBCDirect and VB

 
   Database Help (Home) -> Visual Basic RSS
Next:  ADO Recordset To Access Table  
Author Message
TomTom

External


Since: Jun 12, 2004
Posts: 1



(Msg. 1) Posted: Sat Jun 12, 2004 4:14 am
Post subject: ODBCDirect and VB
Archived from groups: comp>lang>basic>visual>database (more info?)

Hello,

My Sybase driver setting is set to "Select Method: Direct". This
option means only one active cursor is available at anytime.

As a result, my C++ program crashes when I try to open 2 recordsets.
However, my VB probram using ODBC direct does not - everything just
works fine. Why so? I thought it could be due to the CacheSize, but
even on very big table, VB does not crash.

Here is my code:
<------------------------------------>
Set ws = DBEngine.CreateWorkspace("ODBCDirectConnection", "admin",
"", dbUseODBC)
ws.DefaultCursorDriver = dbUseNoCursor
Let strConnection = "ODBC;DSN=" & GODBC & ";UID=" & GLogin &
";PWD=" & GPassword
Set newdb = ws.OpenConnection("VBGatewayConnection",
dbDriverNoPrompt, False, strConnection)


Set req1 = newdb.OpenRecordSet("SELECT * FROM om_trades",
dbOpenForwardOnly)
Dim R As Long
R = req1.CacheSize
While (Not (req1.EOF))
Set req2 = newdb.OpenRecordSet("SELECT * FROM om_trades",
dbOpenForwardOnly)
While (Not (req2.EOF))
req2.MoveNext
Wend
req1.MoveNext
Wend
req1.Close
<------------------------------------>

I would like to understand why, because this might mean VB is behaving
in an inefficient way for us.
Thanks a lot for your attention and suggestion,

SerGioGio

 >> Stay informed about: ODBCDirect and VB 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
sql query returns in wrong format - Hi, Hope someone can help me with this. I have MS SQL 2000 database where i have Table "PriceList" and there a column "Pricemk" wich is data type "money". All data in this column is in form "10001,35". So why when...

arrays - is there a way to concatenate the contents of an array (looping through the array) and storing each item in a comma delimited string? Thanks!

DataReport PageBreak - Hi everyone, I would like to know how to force pagebreak in a datareport for example after 5 records printed. Thank you all

Possible Use of a Cursor - I have a complex query that I hope I can explain it well enough for everyone to understand. I have a table that contains information for work instructions. Contained in the table are "MACHINE_PROC" these are groupings of machining processes....

Scroll Bars - Is there a way to find the size of scrollbars on a system using Visual Basic 6.0? I know how to look and change them on the display properties, but I don't know how to access that information from within Visual Basic.
   Database Help (Home) -> Visual Basic All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]