Friday, February 24, 2012

ADO, SQL Server 2000 and VB5

I am use ADO, SQL S.erver 2000 and aplication in VB 5
When I execute recordset.open VB return error 6 overflow.

Set rsSql = New ADODB.Recordset
rsSql.ActiveConnection = oConn
rsSql.CursorLocation = adUseClient
rsSql.CursorType = adOpenDynamic
rsSql.LockType = adLockPessimistic
rsSql.Index = "ChaveAto"

Sqlquery = "select id_ato from ato where chave_ato = " & "MP00002183200108240120010827PR"

' MsgBox (Sqlquery)

rsSql.Open Sqlqueryif chave_ato is a char/varchar data type you might need to enclose MP00002183200108240120010827PR in quotes.

No comments:

Post a Comment