Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
hko
Starting Member
8 Posts |
Posted - 2001-10-22 : 10:46:51
|
| Hi everyone,I'm a programmer currently working with VB6 in combination withSQL Server 2000. I've run into a weird problem that probably iscaused by different default configurations for the different editionsof SQL Server 2000.Here it is: I programmed some kind of databaselayer in VB for the executionof queries on the SS database. This layer uses ADO recordsets (v2.6) toactually retrieve/write data. The problem is that the code I wrote worksperfectly using a connection to the Standard Edition of SS running onNT Server. But when I copy the code to a local workstation running thePersonal Edition of SS on NT Client and (using SS) I copy the entiredatabase to this Personal Edition the code fails to run correctly.I've determined the cause of this error: my execute query functionfirst states something like:dim adoResultRS as adodb.recordsetset adoResultRS = new adodb.recordsetadoResultRS.cursorlocation = adUseServeradoResultRS.cursortype = adOpenKeysetadoResultRS.locktype = adLockBatchOptimisticadoResultRS.Open sMyQuery, adoMyConnectionI'm typing this from memory so the syntax may not be perfect but it works correctly on the Standard Edition. Now running this on the Personal Edition causes the adoResultRS recordset to be converted from cursortype = adOpenKeyset to cursortype = adOpenDynamic instantaneously when the adoResultRS.Open commandis executed ! Somehow the Personal Edition automatically changes the cursortypeof my recordset even when it is explicitly set with an acceptable value.Of course when my application later on refers to the adoResultRS.RecordCountproperty it crashes because the value of this property is undefined forresultsets with cursortype = adOpenDynamic.Does anyone know what causes this automatic cursortype change and/or how Ican prevent it (i.e. force the Personal Edition to use cursortype = adOpenKeyset) ?I think it may be the way the PE and SE are configured by default (because I haven't yet changed any of the settings). Connecting to the personal editionfor another computer using the network results in the same problem so it is notcause by the application and the PE database server running on the same physical machine.Help/comment would be very much appreciated, I've done some research on this but could not find anything useful.Regards,H. Koffijberg |
|
|
|
|
|