Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLExec and Select...
Message
De
15/03/2004 07:34:26
Erick Miranda
Formata Data Business - Grupo Linx
Contagem, Brésil
 
 
À
11/03/2004 21:03:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00885079
Message ID:
00886240
Vues:
19
Hi João!

>Hi, (olá) Erik,
>I try but no luck, if i retrive the data with a RS and then convert it to dbf, and then do the select,it works ok, but if i call it with SQLEXEC, it shows the error,
>		lcAliasTmp=LOWER(SYS(2015))
>		IF .cTipoLigacao='ADO'
>			*// Procura Dados
>			.oDocFac.NovoCab(.oRS99)
>			.oDocFac.lst_VendasGerais(.oRS99,'1', ldDataI,ldDataF, lcCliI, lcCliF, lcArmI,lcArmF,TDoc,'ADO')
>			.RS2DBF(.oRS99,lcAliasTmp)
>		ENDIF
>		IF .cTipoLigacao='SQLEXEC'
>			.oDocFac.lst_VendasGerais(.oRS99,'1', ldDataI,ldDataF, lcCliI, lcCliF, lcArmI,lcArmF,TDoc,'SQLEXEC')
>			=SQLEXEC(.cSQLEXECCon,.oDocFac.cSQLQuery,lcAliasTmp)
>
>		ENDIF
>		
>		lcAliasMapa=LOWER(SYS(2015))			
>		SELECT * FROM (m.lcAliasTmp) INTO TABLE '.\tmp\'+m.lcAliasMapa READWRITE
>
>		ALTER TABLE &lcAliasMapa ADD COLUMN DataI d(8)
>		ALTER TABLE &lcAliasMapa ADD COLUMN DataF d(8)
>		ALTER TABLE &lcAliasMapa ADD COLUMN CliI  c(5)
>		ALTER TABLE &lcAliasMapa ADD COLUMN CliF  c(5)
>João Batista
>PS: Erick podes responder em Porugues. :)


It's very strange. I tryied here and it's work well. Try this operation in your Command Window with something more simple Select for you to see if it work. Try something like:
lnConn = SqlConnect("MyOdbcConnection", "User", "Password")
? SqlExec(lnConn, "Select * From myTableSql", "myCursor")
Select * From myCursor Into Table C:\temp\myTable
ALTER TABLE myTable ADD COLUMN DataI d(8)
* Or Select *, {} DataI From myCursor Into Table C:\temp\myTable
? SqlDisconnect(lnConn)
I hope this help you.
Good luck! (Boa sorte!)
Bye!

P.S.: I only don't answer you in Portuguese because we are in English Forum 8-D. OK? And sorry my bad English.
Erick
Força Sempre!
Strength Always!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform