Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insufficient result space to convert uniqueidentifier va
Message
 
À
02/04/2001 14:54:39
Sergio Ortiz
Tek Services Group, Llc
Hollywood, Floride, États-Unis
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Divers
Thread ID:
00491033
Message ID:
00491064
Vues:
9
>Good afternoon!
>I'm having the following error message when I try to .update a recordset.
>I have been looking at the code for hours and still can not figure out why is not working.
>
>Any help is appreciated!.
>
>Erro message:
>'Insufficient result space to convert uniqueidentifier value to char'.
>
>Here is my code for connection and recordset.:
>
>Option Explicit
>Dim cnnPhoneSQL As ADODB.Connection
>Dim rstPhonesSQL As ADODB.Recordset
>Dim strSQL As String
>Private Sub Form_Load()
>
>'creating a connection
>Set cnnPhoneSQL = New Connection
>With cnnPhoneSQL
>    .Provider = "SQLOLEDB"
>    .ConnectionString = "User ID = sa;" & _
>                     "Data Source = WEBDEV;" & _
>                     "Initial Catalog = Phone"
>    .Open
>End With
>
>'Creating recordset
>Set rstPhonesSQL = New Recordset
>With rstPhonesSQL
>    .CursorType = adOpenDynamic
>    .LockType = adLockOptimistic
>    .CursorLocation = adUseServer
>    .Open "SELECT * FROM Phones ORDER BY name ASC", cnnPhoneSQL
> End With
>
>'Populate textbox
>Set txtLastName.DataSource = rstPhonesSQL
>txtLastName.DataField = "last_name"
>
>End Sub
>Private Sub cmdAdd_Click()
>    rstPhonesSQL.AddNew
>End Sub
>Private Sub cmdSave_Click()
>    rstPhonesSQL.Fields("last_name") = Trim(txtLastName.Text)
>    rstPhonesSQL.Update
>End Sub
>
>Thanks,
>

Try setting your cursor client side:
.CursorLocation = adUseClient
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform