Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Help on SQL To VFP Please!!!
Okay, hello and thanks in advance. I have a bit of a problem here, on a time crunch. I have a valid connection and loadout from an SQL data source, into a VFP cursor. Eventually, to dump into a database, but right now, just to list a report of certain key data items of the SQL source. However, one of the KEY data items, which needs to be reported, displayed is an SQL field, binary, contained in a memo field (aahhh!!!!).
So, my question is how do we convert the binary memo data into some vfp value, string or numeric?? I have tried repeatedly the BINTOC(), but not with any luck. Here is what I have as a test:
*-- this works
ln1 = 0
lnConnHandle = SQLStringConnect('DRIVER=sql server;SERVER=shiva;UID=sa;PWD=;DATABASE=methodistcrm')
*-- this works
lcSQL = 'SELECT * FROM entity ORDER BY entity_key'
lcCursor = '_mytable'
*-- this works
DO WHILE ln1 = 0
ln1=SQLEXEC(lnConnHandle, lcSQL, lcCursor)
ENDDO
*-- Okay, the data is now in a cursor
SELECT (lcCursor)
SCAN
*-- this is all mucky!!
lnIndex = entity_id
lnNewIndex = BINTOC(lnIndex)
SKIP
ENDSCAN
*-- just to tidy up
ln2=SQLDISCONNECT(lnConnHandle)
Any suggestions? again, TIA!!!
Ric
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement