MS-SQL y Fivewin
MS-SQL y Fivewin
Saludos foro,
Actualmente manejo una Base de Datos MS SQL Server y necesitamos desarrollar una aplicacion que conecte con la misma. Obviamente TDolphin no es opcion y cambiar a MySQL tampoco, asi que toca ADO o algun otra herramienta de fw para conectar.
Podria alguien aportarme como maneja este tipo de conexion entre una aplicacion y la BBDD
Gracias de antemano
Actualmente manejo una Base de Datos MS SQL Server y necesitamos desarrollar una aplicacion que conecte con la misma. Obviamente TDolphin no es opcion y cambiar a MySQL tampoco, asi que toca ADO o algun otra herramienta de fw para conectar.
Podria alguien aportarme como maneja este tipo de conexion entre una aplicacion y la BBDD
Gracias de antemano
Re: MS-SQL y Fivewin
Si te conectas con ADO no hay mayores problemas. Busca la cadena de conexión y sales andando.
Saludos
Saludos
Re: MS-SQL y Fivewin
Gracias Horacio
Tienes algun ejemplo?
Tienes algun ejemplo?
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: MS-SQL y Fivewin
Gracias Antonio,
Lo revisare
Lo revisare
Re: MS-SQL y Fivewin
Entra en este link
http://www.connectionstrings.com/sql-server/
Este es el código de conexión para mysql
Reemplaza por la cadena de conexión de Ms-Sql
Saludos
http://www.connectionstrings.com/sql-server/
Este es el código de conexión para mysql
Code: Select all
oVarGlobales : oCon := CreateObject("ADODB.Connection")
oVarGlobales : oCon : Open := ( "Driver={MySQL ODBC 5.1 Driver};Server=" + cHost + ";Database=mysql;User=" + cUser + ";Password=" + cPassw + ";Option=3;" )
Saludos
-
- Posts: 122
- Joined: Wed Oct 12, 2005 1:03 pm
- Location: Cuernacava, Morelos Mexico
Re: MS-SQL y Fivewin
otro ejemplo
oApp:ConnectionString := "Driver={SQL Server};Server=192.168.1.100;" + ;
"Trusted_Connection=no;Database=polizas" + ;
";Uid=contab;Pwd=Polizas123;"
oApp:ConnectionString := "Driver={SQL Server};Server=192.168.1.100;" + ;
"Trusted_Connection=no;Database=polizas" + ;
";Uid=contab;Pwd=Polizas123;"
Marco Augusto Rodriguez Manzo
fwh 2020 Xharbour 1.2.3
MySQL 5.0.19 Fastreport
PERZO SOFT
Sistemas Personalizados
fwh 2020 Xharbour 1.2.3
MySQL 5.0.19 Fastreport
PERZO SOFT
Sistemas Personalizados
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: MS-SQL y Fivewin
When we use FWH, there is no need to search any where for connection strings,etc. FWH makes using ADO very simple.
Here is a working example on my computer
Here is a working example on my computer
Code: Select all
ADOCONNECT oCn TO MSSQL SERVER GNRHP\SQLEXPRESS database FWH USER SA PASSWORD mypwd
// where server is "GNRHP\SQLEXPRESS', database is "FWH", usernaem is "SA' and password is "mypwd"
if oCn == nil
MsgIbfo( "failed to connect" )
return nil
else
aTables := FW_AdoTables( oCn )
XBROWSER aTables // show list of tables in database
oRs := FW_OpenRecordSet( oCn, "CUSTOMER" )
XBROWSER oRs AUTOSORT // open and show one tablee
oRs:Close()
oCn:Close()
endif
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: MS-SQL y Fivewin
Antonio,
Con Fivedbu me arroja el siguiente error
Application
===========
Path and name: D:\fivedbu_20140730\fivedbu.exe (32 bits)
Size: 5,550,080 bytes
Compiler version: Harbour 3.2.0dev (r1406271520)
FiveWin Version: FWH 14.06
Windows version: 6.1, Build 7600
Time from start: 0 hours 0 mins 14 secs
Error occurred at: 18/03/2016, 21:40:24
Error description: Error BASE/1004 No exported method: OPENSCHEMA
Args:
[ 1] = U
[ 2] = N 20
Stack Calls
===========
Called from: => OPENSCHEMA( 0 )
Called from: C:\fwteam\samples\fivedbu.prg => ADOOPEN( 473 )
Called from: C:\fwteam\samples\fivedbu.prg => (b)BUILDMENU( 132 )
Called from: .\source\classes\MRU.PRG => (b)TMRU_NEW( 68 )
Called from: .\source\classes\MENU.PRG => TMENU:COMMAND( 467 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:COMMAND( 1062 )
Called from: .\source\classes\MDIFRAME.PRG => TMDIFRAME:COMMAND( 255 )
Called from: => TMDIFRAME:HANDLEEVENT( 0 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3291 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE( 1015 )
Called from: C:\fwteam\samples\fivedbu.prg => MAIN( 57 )
Es una Base de Datos sencilla con 2 tablas
Con Fivedbu me arroja el siguiente error
Application
===========
Path and name: D:\fivedbu_20140730\fivedbu.exe (32 bits)
Size: 5,550,080 bytes
Compiler version: Harbour 3.2.0dev (r1406271520)
FiveWin Version: FWH 14.06
Windows version: 6.1, Build 7600
Time from start: 0 hours 0 mins 14 secs
Error occurred at: 18/03/2016, 21:40:24
Error description: Error BASE/1004 No exported method: OPENSCHEMA
Args:
[ 1] = U
[ 2] = N 20
Stack Calls
===========
Called from: => OPENSCHEMA( 0 )
Called from: C:\fwteam\samples\fivedbu.prg => ADOOPEN( 473 )
Called from: C:\fwteam\samples\fivedbu.prg => (b)BUILDMENU( 132 )
Called from: .\source\classes\MRU.PRG => (b)TMRU_NEW( 68 )
Called from: .\source\classes\MENU.PRG => TMENU:COMMAND( 467 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:COMMAND( 1062 )
Called from: .\source\classes\MDIFRAME.PRG => TMDIFRAME:COMMAND( 255 )
Called from: => TMDIFRAME:HANDLEEVENT( 0 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3291 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE( 1015 )
Called from: C:\fwteam\samples\fivedbu.prg => MAIN( 57 )
Es una Base de Datos sencilla con 2 tablas