by jose_murugosa » Thu Oct 06, 2022 4:35 pm
Gracias xManuel, Leandor y Horacio, he probado 2 modos de conexión sin éxito.
Adjunto el código del prg y la respuesta según la sintaxis utilizada.
Código:
FUNCTION Main()
LOCAL oCn2, oRs2, cSql, oErr
oCn2 := FW_OpenADOConnection( { "MSSQL", "192.168.120.206", "SarubbiAlba", "sa", "Came0303" }, .t., oErr )
xBrowse( oCn2 )
cSql:= "select kxp.corte, k.descripcion, p.id, p.descripcion from P0017 p inner join P0031 kxp on kxp.producto=p.codigo inner join P0029 k on k.codigo=kxp.corte"
oRs2:=oCn2:RowSet( cSql )
xBrowse( oRs2 )
RETURN nil
Error:
Application
===========
Path and name: D:\XBASE-PROYECTOS\RENDIMIENTO-SERVICIOS\RendServ.exe (32 bits)
Size: 4,834,816 bytes
Compiler version: Harbour 3.2.0dev (r2008190002)
FiveWin version: FWH 22.03
C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
Windows version: 6.2, Build 9200
Time from start: 0 hours 0 mins 0 secs
Error occurred at: 10/06/22, 13:28:04
Error description: (DOS Error -2147352567) WINOLE/1007 Argumentos incorrectos, fuera del intervalo permitido o en conflicto con otros. (0x800A0BB9): ADODB.Connection
Args:
[ 1] = C TLINKLIST
Stack Calls
===========
Called from: => TOLEAUTO:ISKINDOF( 0 )
Called from: .\source\function\XBROWSER.PRG => XBROWSE( 101 )
Called from: D:\XBASE-PROYECTOS\RENDIMIENTO-SERVICIOS\SOURCE\conexion-ado.prg => MAIN( 8 )
System
======
CPU type: Intel(R) Core(TM) i5-6400T CPU @ 2.20GHz 2208 Mhz
Hardware memory: 12063 megs
Free System resources: 90 %
GDI resources: 90 %
User resources: 90 %
Windows total applications running: 5
1 ,
2 , C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_a8625c
3 Ajustes, C:\Windows\System32\1033\MSOLEDBSQLR.RLL
4 GDI+ Window (RendServ.exe), C:\Windows\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.19041.2006_none_d94bc80de10970
5 Licencia de Deep Freeze, D:\XBASE-PROYECTOS\RENDIMIENTO-SERVICIOS\RendServ.exe
Variables in use
================
Procedure Type Value
==========================
TOLEAUTO:ISKINDOF
Param 1: O Class: ERROR
XBROWSE
Param 1: C "TLINKLIST"
Local 1: U
Local 2: U
MAIN
Param 1: O Class: TOLEAUTO
Local 1: C "TOLEAUTO"
Local 2: L .F.
Local 3: U
Local 4: U
Local 5: U
Local 6: L .T.
Local 7: U
Local 8: U
Local 9: U
Local 10: L .F.
Local 11: U
Local 12: U
Local 13: U
Local 14: U
Local 15: O Class: TFONT
Local 16: O Class: TFONT
Local 17: U
Local 18: U
Local 19: N 1020.00
Local 20: N 384.00
Local 21: U
Local 22: U
Local 23: U
Local 24: U
Local 25: U
Local 26: L .T.
Local 27: U
Local 28: N 1
Local 29: N 1
Local 30: L .F.
Local 31: A Len: 0
Local 32: L .T.
----------------------------------------------------------------------------------------------------
si cambio en el codigo a:
oCn2 := FW_OpenADOConnection( { "MSSQL, 192.168.120.206, SarubbiAlba, sa, Came0303" }, .t., oErr )
El error da:
Application
===========
Path and name: D:\XBASE-PROYECTOS\RENDIMIENTO-SERVICIOS\RendServ.exe (32 bits)
Size: 4,834,816 bytes
Compiler version: Harbour 3.2.0dev (r2008190002)
FiveWin version: FWH 22.03
C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
Windows version: 6.2, Build 9200
Time from start: 0 hours 0 mins 4 secs
Error occurred at: 10/06/22, 13:31:35
Error description: Error BASE/1004 No exported method: ROWSET
Args:
[ 1] = U
[ 2] = C select kxp.corte, k.descripcion, p.id, p.descripcion from P0017 p inner join P0031 kxp on kxp.producto=p.codigo inner join P0029 k on k.codigo=kxp.corte
Stack Calls
===========
Called from: => ROWSET( 0 )
Called from: D:\XBASE-PROYECTOS\RENDIMIENTO-SERVICIOS\SOURCE\conexion-ado.prg => MAIN( 10 )
System
======
CPU type: Intel(R) Core(TM) i5-6400T CPU @ 2.20GHz 2208 Mhz
Hardware memory: 12063 megs
Free System resources: 90 %
GDI resources: 90 %
User resources: 90 %
Windows total applications running: 5
1 ,
2 , C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_a8625c
3 Ajustes, C:\Program Files (x86)\Common Files\System\Ole DB\MSDASQLR.DLL
4 GDI+ Window (RendServ.exe), C:\Windows\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.19041.2006_none_d94bc80de10970
5 Licencia de Deep Freeze, D:\XBASE-PROYECTOS\RENDIMIENTO-SERVICIOS\RendServ.exe
Variables in use
================
Procedure Type Value
==========================
ROWSET
Param 1: O Class: ERROR
MAIN
Param 1: C "select kxp.corte, k.descripcion, p.id, p.descripcion from P0017 p inner join P0031 kxp on kxp.producto=p.codigo inner join P0029 k on k.codigo=kxp.corte"
Local 1: U
Local 2: U
----------------------------------------------------------------------------------------------------
Agradezco desde ya vuestra ayuda
Saludos/Regards,
José Murugosa
"Los errores en programación, siempre están entre la silla y el teclado y la IA!!"