Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Wrong numeric field size from SQLEXEC() call
Message
De
12/12/2005 15:15:04
 
 
À
12/12/2005 13:40:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Divers
Thread ID:
01077250
Message ID:
01077278
Vues:
49
Hi,

you can use SQLEXECEX from VFP2C32, or a CursorAdapter object.
cConnString ="DRIVER={PostgreSQL Unicode};DATABASE=postgres;"+ ;
   "SERVER=127.0.0.1;PORT=5432;UID=postgres;PWD=x;B9=0"
nconnh=SQLSTRINGCONNECT(cconnstring)
TEXT TO csql
CREATE table test ( test char(1));
insert into test values ('');
select 0 AS someField from test
ENDTEXT

IF SQLEXECEX(nconnh, csql,'','',0,'someField N(1)') < 0
  AERROREX('laError')
  DISPLAY MEMORY LIKE laError
  RETURN
ENDIF

SELECT sqlresult
DISPLAY STRUCTURE TO FILE t
MODIFY FILE t

&& cursoradapter approach

loCA = CREATEOBJECT('CursorAdapter')
loCA.SelectCmd = csql
loCA.CursorSchema = 'someField N(1)'
loCA.CursorFill(.t.)
.....
Regards
Christian
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform