mssql server 2012 express

HMG en Español

Moderator: Rathinagiri

User avatar
jairpinho
Posts: 341
Joined: Mon Jul 18, 2011 5:36 pm
Location: Rio Grande do Sul - Brasil
Has thanked: 3 times
Been thanked: 11 times
Contact:

Re: mssql server 2012 express

Post by jairpinho » Wed Apr 17, 2019 11:28 pm

jorge.posadas wrote:
Wed Apr 17, 2019 3:11 pm
jairpinho

This an example I hope help you
Gracias Jorge, funcionó perfectamente sin odbc conexión nativa sigue el ejemplo para todos. espero recibir más ejemplos para otros tipos de conexión rdd o odbc para dejar como exeomplo para el grupo

english
Thanks Jorge, worked perfectly without odbc native connection follows example for all. I hope to receive more examples for other types of connection rdd or odbc to leave as exeomplo for the group
Attachments
AD0_NATIVE.zip
(1.49 MiB) Downloaded 69 times
Jair Pinho
HMG ALTA REVOLUÇÃO xBASE
HMG xBASE REVOLUTION HIGH
http://www.hmgforum.com.br


Tiger
Posts: 36
Joined: Mon Aug 31, 2015 11:28 am
Location: Taipei
Has thanked: 5 times
Been thanked: 6 times

Post by Tiger » Wed Sep 04, 2019 3:50 am

Hi jairpinho,

Thanks for your sample "AD0_NATIVE.zip ", it helps me to connect to the MSSQL now. And I just wonder how to export the query result to excel file. Can anyone guide me to do it? I try to search the form but I can't get it.

Tiger

User avatar
AUGE_OHR
Posts: 65
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 1 time
Been thanked: 8 times

Post by AUGE_OHR » Wed Sep 04, 2019 9:45 pm

hi,
Tiger wrote:
Wed Sep 04, 2019 3:50 am
And I just wonder how to export the query result to excel file. Can anyone guide me to do it? I
there is a Excel Demo in c:\hmg.3.4.4\SAMPLES\Controls\OLE\demo.prg

create a empty worksheet and pass hole Array like this

Code: Select all

PROCEDURE Excel(aData)
LOCAL oExcel, oHoja

   oExcel := CreateObject( "Excel.Application" )
   oExcel:WorkBooks:Add()
   oHoja := oExcel:ActiveSheet()
   // fill Sheet with Array
   oHoja:value := aData

Tiger
Posts: 36
Joined: Mon Aug 31, 2015 11:28 am
Location: Taipei
Has thanked: 5 times
Been thanked: 6 times

Post by Tiger » Thu Sep 05, 2019 12:37 am

AUGE_OHR wrote:
Wed Sep 04, 2019 9:45 pm
hi,
Tiger wrote:
Wed Sep 04, 2019 3:50 am
And I just wonder how to export the query result to excel file. Can anyone guide me to do it? I
there is a Excel Demo in c:\hmg.3.4.4\SAMPLES\Controls\OLE\demo.prg

create a empty worksheet and pass hole Array like this

Code: Select all

PROCEDURE Excel(aData)
LOCAL oExcel, oHoja

   oExcel := CreateObject( "Excel.Application" )
   oExcel:WorkBooks:Add()
   oHoja := oExcel:ActiveSheet()
   // fill Sheet with Array
   oHoja:value := aData
Thank for the hint, I will try this way.

Post Reply