Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Field attributes not what expected in ADO recordset
Message
De
15/11/2000 14:06:28
Jorge Haro
Independent Consultant
Juarez, Mexique
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Field attributes not what expected in ADO recordset
Divers
Thread ID:
00442246
Message ID:
00442246
Vues:
97
I'm creating a recordset out of an SQL Server 6.5 database, but I'm getting some strange values in the field attributes property, for example, 32784 for an identity field, which is not even a possible value according to the documentation.

For regular, updatable fields I'm getting a value of 24, which would mean That the field contains fixed length data, and the provider can't determine if data can be wtitten to it????, I can modify it and send updates, but the field attributes won't give the information I need.

Just for reference the possible values are:
#DEFINE ADFLDMAYDEFER			0x00000002
#DEFINE ADFLDUPDATABLE			0x00000004
#DEFINE ADFLDUNKNOWNUPDATABLE	0x00000008
#DEFINE ADFLDFIXED				0x00000010
#DEFINE ADFLDISNULLABLE			0x00000020
#DEFINE ADFLDMAYBENULL			0x00000040
#DEFINE ADFLDLONG				0x00000080
#DEFINE ADFLDROWID				0x00000100
#DEFINE ADFLDROWVERSION			0x00000200
#DEFINE ADFLDCACHEDEFERRED		0x00001000
Or a sum of two or more of them of course for a maximum value of 5118.

I'm using the following test code to generate the RS:
public oCon
oCon = createobject("adodb.connection")
oCon.Provider = "SQLOLEDB.1"
oCon.ConnectionString = "Initial Catalog = SVEIN ;user id=sa;Data Source = CELERY450; Persist Security Info = False"

oCon.open()

public ors
ors = createobject("adodb.recordset")
#Define adUseClient   3
#Define adLockBatchOptimistic   4
#Define adCmdTable   2

With ors
   .Source = "Classes"
   .ActiveConnection = oCon
   .CursorLocation = adUseClient
   .LockType = adLockBatchOptimistic
   .Open
EndWith
As always TIA.
Répondre
Fil
Voir

Click here to load this message in the networking platform