![]() |
| | ||||
| ||||
| |
| |||
| Hola, Aqui hay un codigo que te puede ayudar. * This script handles the ADO Connection and uses a CursorAdapter object * to retrieve data to a cursor. PUBLIC oCA as CursorAdapter LOCAL oConn as ADODB.Connection LOCAL oRS as ADODB.Recordset LOCAL oException AS Exception LOCAL cConnString * Handle connections - insert connection code cConnString = [Provider=SQLOLEDB.1;Data Source=IBMT30\SQLEXPRESS;Initial Catalog=MiBaseDatos;User ID=sa;Password=xxxxxx] TRY oConn = createobject('ADODB.Connection') * Ensure that you handle userid and password if not * specified in connection string. * ex. oConn.Open(cConnString, userid, password) oConn.Open(cConnString) oRS = CREATEOBJECT("ADODB.Recordset") oRS.DataSource.CursorLocation = 3 &&adUseClient oRS.DataSource.LockType = 3 &&adLockOptimistic oRS.ActiveConnection = oConn oCA=CREATEOBJECT("CursorAdapter") oCA.DataSourceType = "ADO" oCA.DataSource = oRS oCA.MapBinary = .T. oCA.MapVarchar = .T. oCA.Alias = "MiTabla" oCA.SelectCmd = "SELECT * FROM MiTabla" IF !oCA.CursorFill() * Replace with error code here LOCAL laError DIMENSION laError[1] AERROR(laError) MESSAGEBOX(laError[2]) ELSE * Replace with user code here. Code below allows for * you to edit and send updates to the backend. LOCAL laFlds,lcStr,lnFldCount,i DIMENSION laFlds[1] lnFldCount=AFIELDS(laFlds) lcStr="" FOR i = 1 TO lnFldCount lcStr = lcStr + laFlds[m.i,1] + "," ENDFOR oCA.UpdatableFieldList = lcStr BROWSE NORMAL NOWAIT ENDIF CATCH TO oException * Replace with exception handling code here MESSAGEBOX(oException.Message) ENDTRY * Add user code here. * Note: cursors created by CursorAdapter object are closed when object is released. Saludos Miguel Herbias Lima-Peru "Franklin Maza" <frankymaza***hotmail.com> wrote in message news:OeglrwMHHHA.816***TK2MSFTNGP06.phx.gbl... > Hola amigos del foro me pueden ayudar > indicando en donde puedo conseguir un ejemplo de CA de vfp9 > y SQL Server > > gracias > > |
| |||
| Hola, Aqui hay un codigo que te puede ayudar. * This script handles the ADO Connection and uses a CursorAdapter object * to retrieve data to a cursor. PUBLIC oCA as CursorAdapter LOCAL oConn as ADODB.Connection LOCAL oRS as ADODB.Recordset LOCAL oException AS Exception LOCAL cConnString * Handle connections - insert connection code cConnString = [Provider=SQLOLEDB.1;Data Source=IBMT30\SQLEXPRESS;Initial Catalog=MiBaseDatos;User ID=sa;Password=xxxxxx] TRY oConn = createobject('ADODB.Connection') * Ensure that you handle userid and password if not * specified in connection string. * ex. oConn.Open(cConnString, userid, password) oConn.Open(cConnString) oRS = CREATEOBJECT("ADODB.Recordset") oRS.DataSource.CursorLocation = 3 &&adUseClient oRS.DataSource.LockType = 3 &&adLockOptimistic oRS.ActiveConnection = oConn oCA=CREATEOBJECT("CursorAdapter") oCA.DataSourceType = "ADO" oCA.DataSource = oRS oCA.MapBinary = .T. oCA.MapVarchar = .T. oCA.Alias = "MiTabla" oCA.SelectCmd = "SELECT * FROM MiTabla" IF !oCA.CursorFill() * Replace with error code here LOCAL laError DIMENSION laError[1] AERROR(laError) MESSAGEBOX(laError[2]) ELSE * Replace with user code here. Code below allows for * you to edit and send updates to the backend. LOCAL laFlds,lcStr,lnFldCount,i DIMENSION laFlds[1] lnFldCount=AFIELDS(laFlds) lcStr="" FOR i = 1 TO lnFldCount lcStr = lcStr + laFlds[m.i,1] + "," ENDFOR oCA.UpdatableFieldList = lcStr BROWSE NORMAL NOWAIT ENDIF CATCH TO oException * Replace with exception handling code here MESSAGEBOX(oException.Message) ENDTRY * Add user code here. * Note: cursors created by CursorAdapter object are closed when object is released. Saludos Miguel Herbias Lima-Peru "Franklin Maza" <frankymaza***hotmail.com> wrote in message news:OeglrwMHHHA.816***TK2MSFTNGP06.phx.gbl... > Hola amigos del foro me pueden ayudar > indicando en donde puedo conseguir un ejemplo de CA de vfp9 > y SQL Server > > gracias > > |
| |||
| Hola, Aqui hay un codigo que te puede ayudar. * This script handles the ADO Connection and uses a CursorAdapter object * to retrieve data to a cursor. PUBLIC oCA as CursorAdapter LOCAL oConn as ADODB.Connection LOCAL oRS as ADODB.Recordset LOCAL oException AS Exception LOCAL cConnString * Handle connections - insert connection code cConnString = [Provider=SQLOLEDB.1;Data Source=IBMT30\SQLEXPRESS;Initial Catalog=MiBaseDatos;User ID=sa;Password=xxxxxx] TRY oConn = createobject('ADODB.Connection') * Ensure that you handle userid and password if not * specified in connection string. * ex. oConn.Open(cConnString, userid, password) oConn.Open(cConnString) oRS = CREATEOBJECT("ADODB.Recordset") oRS.DataSource.CursorLocation = 3 &&adUseClient oRS.DataSource.LockType = 3 &&adLockOptimistic oRS.ActiveConnection = oConn oCA=CREATEOBJECT("CursorAdapter") oCA.DataSourceType = "ADO" oCA.DataSource = oRS oCA.MapBinary = .T. oCA.MapVarchar = .T. oCA.Alias = "MiTabla" oCA.SelectCmd = "SELECT * FROM MiTabla" IF !oCA.CursorFill() * Replace with error code here LOCAL laError DIMENSION laError[1] AERROR(laError) MESSAGEBOX(laError[2]) ELSE * Replace with user code here. Code below allows for * you to edit and send updates to the backend. LOCAL laFlds,lcStr,lnFldCount,i DIMENSION laFlds[1] lnFldCount=AFIELDS(laFlds) lcStr="" FOR i = 1 TO lnFldCount lcStr = lcStr + laFlds[m.i,1] + "," ENDFOR oCA.UpdatableFieldList = lcStr BROWSE NORMAL NOWAIT ENDIF CATCH TO oException * Replace with exception handling code here MESSAGEBOX(oException.Message) ENDTRY * Add user code here. * Note: cursors created by CursorAdapter object are closed when object is released. Saludos Miguel Herbias Lima-Peru "Franklin Maza" <frankymaza***hotmail.com> wrote in message news:OeglrwMHHHA.816***TK2MSFTNGP06.phx.gbl... > Hola amigos del foro me pueden ayudar > indicando en donde puedo conseguir un ejemplo de CA de vfp9 > y SQL Server > > gracias > > |
| |||
| Hola, Aqui hay un codigo que te puede ayudar. * This script handles the ADO Connection and uses a CursorAdapter object * to retrieve data to a cursor. PUBLIC oCA as CursorAdapter LOCAL oConn as ADODB.Connection LOCAL oRS as ADODB.Recordset LOCAL oException AS Exception LOCAL cConnString * Handle connections - insert connection code cConnString = [Provider=SQLOLEDB.1;Data Source=IBMT30\SQLEXPRESS;Initial Catalog=MiBaseDatos;User ID=sa;Password=xxxxxx] TRY oConn = createobject('ADODB.Connection') * Ensure that you handle userid and password if not * specified in connection string. * ex. oConn.Open(cConnString, userid, password) oConn.Open(cConnString) oRS = CREATEOBJECT("ADODB.Recordset") oRS.DataSource.CursorLocation = 3 &&adUseClient oRS.DataSource.LockType = 3 &&adLockOptimistic oRS.ActiveConnection = oConn oCA=CREATEOBJECT("CursorAdapter") oCA.DataSourceType = "ADO" oCA.DataSource = oRS oCA.MapBinary = .T. oCA.MapVarchar = .T. oCA.Alias = "MiTabla" oCA.SelectCmd = "SELECT * FROM MiTabla" IF !oCA.CursorFill() * Replace with error code here LOCAL laError DIMENSION laError[1] AERROR(laError) MESSAGEBOX(laError[2]) ELSE * Replace with user code here. Code below allows for * you to edit and send updates to the backend. LOCAL laFlds,lcStr,lnFldCount,i DIMENSION laFlds[1] lnFldCount=AFIELDS(laFlds) lcStr="" FOR i = 1 TO lnFldCount lcStr = lcStr + laFlds[m.i,1] + "," ENDFOR oCA.UpdatableFieldList = lcStr BROWSE NORMAL NOWAIT ENDIF CATCH TO oException * Replace with exception handling code here MESSAGEBOX(oException.Message) ENDTRY * Add user code here. * Note: cursors created by CursorAdapter object are closed when object is released. Saludos Miguel Herbias Lima-Peru "Franklin Maza" <frankymaza***hotmail.com> wrote in message news:OeglrwMHHHA.816***TK2MSFTNGP06.phx.gbl... > Hola amigos del foro me pueden ayudar > indicando en donde puedo conseguir un ejemplo de CA de vfp9 > y SQL Server > > gracias > > |
| |||
| Hola, Aqui hay un codigo que te puede ayudar. * This script handles the ADO Connection and uses a CursorAdapter object * to retrieve data to a cursor. PUBLIC oCA as CursorAdapter LOCAL oConn as ADODB.Connection LOCAL oRS as ADODB.Recordset LOCAL oException AS Exception LOCAL cConnString * Handle connections - insert connection code cConnString = [Provider=SQLOLEDB.1;Data Source=IBMT30\SQLEXPRESS;Initial Catalog=MiBaseDatos;User ID=sa;Password=xxxxxx] TRY oConn = createobject('ADODB.Connection') * Ensure that you handle userid and password if not * specified in connection string. * ex. oConn.Open(cConnString, userid, password) oConn.Open(cConnString) oRS = CREATEOBJECT("ADODB.Recordset") oRS.DataSource.CursorLocation = 3 &&adUseClient oRS.DataSource.LockType = 3 &&adLockOptimistic oRS.ActiveConnection = oConn oCA=CREATEOBJECT("CursorAdapter") oCA.DataSourceType = "ADO" oCA.DataSource = oRS oCA.MapBinary = .T. oCA.MapVarchar = .T. oCA.Alias = "MiTabla" oCA.SelectCmd = "SELECT * FROM MiTabla" IF !oCA.CursorFill() * Replace with error code here LOCAL laError DIMENSION laError[1] AERROR(laError) MESSAGEBOX(laError[2]) ELSE * Replace with user code here. Code below allows for * you to edit and send updates to the backend. LOCAL laFlds,lcStr,lnFldCount,i DIMENSION laFlds[1] lnFldCount=AFIELDS(laFlds) lcStr="" FOR i = 1 TO lnFldCount lcStr = lcStr + laFlds[m.i,1] + "," ENDFOR oCA.UpdatableFieldList = lcStr BROWSE NORMAL NOWAIT ENDIF CATCH TO oException * Replace with exception handling code here MESSAGEBOX(oException.Message) ENDTRY * Add user code here. * Note: cursors created by CursorAdapter object are closed when object is released. Saludos Miguel Herbias Lima-Peru "Franklin Maza" <frankymaza***hotmail.com> wrote in message news:OeglrwMHHHA.816***TK2MSFTNGP06.phx.gbl... > Hola amigos del foro me pueden ayudar > indicando en donde puedo conseguir un ejemplo de CA de vfp9 > y SQL Server > > gracias > > |
| |
| |
![]() |
| Herramientas | |
| Desplegado | |
| |
Temas Similares | ||||
| Tema | Autor | Foro | Respuestas | Último mensaje |
| Cursor Adapter | Rene Acevedo | Newsgroup microsoft.public.es.vfoxpro.datos | 0 | 19-12-2007 21:07:47 |
| Cursor Adapter | Víctor | Newsgroup microsoft.public.es.vfoxpro.datos | 15 | 03-10-2007 20:49:30 |
| cursor adapter en vistas | Daniel C.B. | Newsgroup microsoft.public.es.vfoxpro.datos | 0 | 20-04-2007 14:49:05 |
| Ejemplos de Cursor Adapter | Franklin Maza | Newsgroup microsoft.public.es.vfoxpro.datos | 35 | 04-05-2006 13:13:18 |
| cursor adapter | diego santos | Newsgroup microsoft.public.es.vfoxpro.datos | 0 | 12-04-2006 03:20:02 |