tengo el siguiente problema.
Una aplicación desarrollada con NetExpress que accede a una BD en SQL Server utilizando una conexión ODBC a través del SQL Server Native Client 11.0,
y en Win10, accede sin problemas y no da error, y ejecuta las SELECT, sin ningún problema.
Mientras que en otro PC con Win11 Versión 24H2, la misma aplicación, y configurado el mismo acceso ODBC y la misma BD, la conexión a la misma la ejecuta correctamente, pero cuando el proceso ejecuta la primera sentencia SELECT, devuelve un SQL Code error -208.
EXEC SQL
SELECT E.[nombre_em], E.[clave_em],
E.[bd_em], E.niedi_em, E.pobl_em
INTO :QNOMBRE-EM, :QCLAVE-EM, :QBD-EM ,:QNIEDI-EM,
:QPOBL-EM
FROM [tbEmpresas] E
WHERE E.[Cod_em] = :QCOD-EM
END-EXEC
Cual puede ser el problema y como solucionarlo?
------------------------------
GREGORIO ARROYO GONZALEZ
Gerente
Rocket Forum Shared Account
------------------------------
tengo el siguiente problema.
Una aplicación desarrollada con NetExpress que accede a una BD en SQL Server utilizando una conexión ODBC a través del SQL Server Native Client 11.0,
y en Win10, accede sin problemas y no da error, y ejecuta las SELECT, sin ningún problema.
Mientras que en otro PC con Win11 Versión 24H2, la misma aplicación, y configurado el mismo acceso ODBC y la misma BD, la conexión a la misma la ejecuta correctamente, pero cuando el proceso ejecuta la primera sentencia SELECT, devuelve un SQL Code error -208.
EXEC SQL
SELECT E.[nombre_em], E.[clave_em],
E.[bd_em], E.niedi_em, E.pobl_em
INTO :QNOMBRE-EM, :QCLAVE-EM, :QBD-EM ,:QNIEDI-EM,
:QPOBL-EM
FROM [tbEmpresas] E
WHERE E.[Cod_em] = :QCOD-EM
END-EXEC
Cual puede ser el problema y como solucionarlo?
------------------------------
GREGORIO ARROYO GONZALEZ
Gerente
Rocket Forum Shared Account
------------------------------
The SQLCODE error returned is documented here MSSQLSERVER_208 - SQL Server | Microsoft Learn
What is the value of the SQLERRMC variable after the select? This should provide a message related to the error.
Is it the same user accessing the database? One of the reasons for this error could be that the user does not have the correct permissions to execute a SELECT statement.
You could turn on an ODBC trace on the system where it works and the one that fails and compare them to see what is different.
$SET SQL(ODBCTRACE=ALWAYS)
------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------
The SQLCODE error returned is documented here MSSQLSERVER_208 - SQL Server | Microsoft Learn
What is the value of the SQLERRMC variable after the select? This should provide a message related to the error.
Is it the same user accessing the database? One of the reasons for this error could be that the user does not have the correct permissions to execute a SELECT statement.
You could turn on an ODBC trace on the system where it works and the one that fails and compare them to see what is different.
$SET SQL(ODBCTRACE=ALWAYS)
------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------
Hola,
El error 208 es el mismo que el SQL CODE -00000208?
Puede influir que en PC con W11 tengo la versión Microsoft SQL Server 2019 (RTM-GDR) (KB5046859) - 15.0.2130.3 (X64) Oct 18 2024 15:25:23 Copyright (C) 2019 Microsoft Corporation Standard Edition (64-bit) on Windows 10 Enterprise 10.0
(Build 26100: ) (Hypervisor) y en el equipo con W10 tengo SQL Server 2014.
Saludos cordiales
Goyo Arroyo
AG Informatica y Servicios, SA
Pedro Cormenzana 12
20012 San Sebastian, Spain
Telef. +34 - 943 445101
aginfo@agissa.com / https://agissa.com/
Advertencia legal: Este mensaje enviado desde AG Informática y Servicios SA y, en su caso, los ficheros anexos son confidenciales, especialmente en lo que respecta a los datos personales, y se dirigen exclusivamente al destinatario referenciado. Si usted no lo es y lo ha recibido por error o tiene conocimiento del mismo por cualquier motivo, le rogamos que nos lo comunique por este medio y proceda a destruirlo o borrarlo, y que en todo caso se abstenga de utilizar, reproducir, alterar, archivar o comunicar a terceros el presente mensaje y ficheros anexos, todo ello bajo pena de incurrir en responsabilidades legales. El emisor no garantiza la integridad, rapidez o seguridad del presente correo, ni se responsabiliza de posibles perjuicios derivados de la captura, incorporaciones de virus o cualesquiera otras manipulaciones efectuadas por terceros.
Disclaimer: This message sent from AG Informática y Servicios SA and any attached files transmitted with it, is confidential, especially as regards personal data. It is intended solely for the use of the individual or entity to whom it is addressed. If you are not the intended recipient and have received this information in error or have accessed it for any reason, please notify us of this fact by email reply and then destroy or delete the message, refraining from any reproduction, use, alteration, filing or communication to third parties of this message and attached files on penalty of incurring legal responsibilities. The sender does not guarantee the integrity, the accuracy, the swift delivery or the security of this email transmission, and assumes no responsibility for any possible damage incurred through data capture, virus incorporation or any manipulation carried out by third parties.
P Antes de imprimir este mensaje, asegúrese de que es necesario hacerlo. /P Please consider your environmental responsibility : before printing this e-mail, ask yourself whether you need a hard copy.
La información contenida en este mensaje y/o archivo(s) adjunto(s) es confidencial y está destinada a ser leída sólo por la(s) persona(s) a la(s) que va dirigida. Si usted lee este mensaje y no es el destinatario señalado, el empleado o el agente responsable de entregar el mensaje al destinatario, o ha recibido esta comunicación por error, le informamos que está totalmente prohibida, y puede ser ilegal, cualquier divulgación, distribución o reproducción de esta comunicación, y le rogamos que nos lo notifique inmediatamente y nos devuelva el mensaje original a la dirección arriba mencionada. Gracias. En cumplimiento de lo dispuesto en el Reglamento 2016/679 RGPD, del Parlamento Europeo y del Consejo, de 27 de abril de 2016, le informamos que sus datos personales han sido almacenados en nuestro fichero automatizado con el fin de remitirle información comercial. Usted tiene derecho a acceder a sus datos almacenados en nuestro fichero de clientes, rectificarlos, cancelarlos, así como oponerse a su tratamiento. Para ejercitar su derecho de acceso, modificación, cancelación u oposición a su tratamiento le rogamos lo haga a través de correo electrónico a aginfo@agissa.com. Política de Privacidad
De: Chris Glazier via Rocket Software Forum
Enviado el: miércoles, 12 de febrero de 2025 20:47
Para: goyoarroyog@gmail.com
Asunto: RE: Rocket® Net Express/Server Express (formerly a Micro Focus® product) : error SQL CODE -00000208
The SQLCODE error returned is documented here MSSQLSERVER_208 - SQL Server | Microsoft Learn What is the value of the SQLERRMC variable after... -posted to the "Rocket® Net Express/Server Express (formerly a Micro Focus® product)" forum
Invite colleagues to join Rocket Forum and expand our expert network!
_____
Rocket® Net Express/Server Express (formerly a Micro Focus® product)
Post New Message Online Post New Message
Invite your colleagues to join the Rocket Forum and grow our expert network. Share this link.
Re: error SQL CODE -00000208
Reply to Group Online
Reply to Group
Reply to Sender
Reply to Sender via Email
Feb 12, 2025 2:32 PM
Chris Glazier
The SQLCODE error returned is documented here MSSQLSERVER_208 - SQL Server | Microsoft Learn
What is the value of the SQLERRMC variable after the select? This should provide a message related to the error.
Is it the same user accessing the database? One of the reasons for this error could be that the user does not have the correct permissions to execute a SELECT statement.
You could turn on an ODBC trace on the system where it works and the one that fails and compare them to see what is different.
$SET SQL(ODBCTRACE=ALWAYS)
------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------
Reply to Group Online Reply to Group via Email Reply to Sender Online View Thread Forward Flag as Inappropriate Post New Message Online Post New Message via Email
Hola,
El error 208 es el mismo que el SQL CODE -00000208?
Puede influir que en PC con W11 tengo la versión Microsoft SQL Server 2019 (RTM-GDR) (KB5046859) - 15.0.2130.3 (X64) Oct 18 2024 15:25:23 Copyright (C) 2019 Microsoft Corporation Standard Edition (64-bit) on Windows 10 Enterprise 10.0
(Build 26100: ) (Hypervisor) y en el equipo con W10 tengo SQL Server 2014.
Saludos cordiales
Goyo Arroyo
AG Informatica y Servicios, SA
Pedro Cormenzana 12
20012 San Sebastian, Spain
Telef. +34 - 943 445101
aginfo@agissa.com / https://agissa.com/
Advertencia legal: Este mensaje enviado desde AG Informática y Servicios SA y, en su caso, los ficheros anexos son confidenciales, especialmente en lo que respecta a los datos personales, y se dirigen exclusivamente al destinatario referenciado. Si usted no lo es y lo ha recibido por error o tiene conocimiento del mismo por cualquier motivo, le rogamos que nos lo comunique por este medio y proceda a destruirlo o borrarlo, y que en todo caso se abstenga de utilizar, reproducir, alterar, archivar o comunicar a terceros el presente mensaje y ficheros anexos, todo ello bajo pena de incurrir en responsabilidades legales. El emisor no garantiza la integridad, rapidez o seguridad del presente correo, ni se responsabiliza de posibles perjuicios derivados de la captura, incorporaciones de virus o cualesquiera otras manipulaciones efectuadas por terceros.
Disclaimer: This message sent from AG Informática y Servicios SA and any attached files transmitted with it, is confidential, especially as regards personal data. It is intended solely for the use of the individual or entity to whom it is addressed. If you are not the intended recipient and have received this information in error or have accessed it for any reason, please notify us of this fact by email reply and then destroy or delete the message, refraining from any reproduction, use, alteration, filing or communication to third parties of this message and attached files on penalty of incurring legal responsibilities. The sender does not guarantee the integrity, the accuracy, the swift delivery or the security of this email transmission, and assumes no responsibility for any possible damage incurred through data capture, virus incorporation or any manipulation carried out by third parties.
P Antes de imprimir este mensaje, asegúrese de que es necesario hacerlo. /P Please consider your environmental responsibility : before printing this e-mail, ask yourself whether you need a hard copy.
La información contenida en este mensaje y/o archivo(s) adjunto(s) es confidencial y está destinada a ser leída sólo por la(s) persona(s) a la(s) que va dirigida. Si usted lee este mensaje y no es el destinatario señalado, el empleado o el agente responsable de entregar el mensaje al destinatario, o ha recibido esta comunicación por error, le informamos que está totalmente prohibida, y puede ser ilegal, cualquier divulgación, distribución o reproducción de esta comunicación, y le rogamos que nos lo notifique inmediatamente y nos devuelva el mensaje original a la dirección arriba mencionada. Gracias. En cumplimiento de lo dispuesto en el Reglamento 2016/679 RGPD, del Parlamento Europeo y del Consejo, de 27 de abril de 2016, le informamos que sus datos personales han sido almacenados en nuestro fichero automatizado con el fin de remitirle información comercial. Usted tiene derecho a acceder a sus datos almacenados en nuestro fichero de clientes, rectificarlos, cancelarlos, así como oponerse a su tratamiento. Para ejercitar su derecho de acceso, modificación, cancelación u oposición a su tratamiento le rogamos lo haga a través de correo electrónico a aginfo@agissa.com. Política de Privacidad
De: Chris Glazier via Rocket Software Forum
Enviado el: miércoles, 12 de febrero de 2025 20:47
Para: goyoarroyog@gmail.com
Asunto: RE: Rocket® Net Express/Server Express (formerly a Micro Focus® product) : error SQL CODE -00000208
The SQLCODE error returned is documented here MSSQLSERVER_208 - SQL Server | Microsoft Learn What is the value of the SQLERRMC variable after... -posted to the "Rocket® Net Express/Server Express (formerly a Micro Focus® product)" forum
Invite colleagues to join Rocket Forum and expand our expert network!
_____
Rocket® Net Express/Server Express (formerly a Micro Focus® product)
Post New Message Online Post New Message
Invite your colleagues to join the Rocket Forum and grow our expert network. Share this link.
Re: error SQL CODE -00000208
Reply to Group Online
Reply to Group
Reply to Sender
Reply to Sender via Email
Feb 12, 2025 2:32 PM
Chris Glazier
The SQLCODE error returned is documented here MSSQLSERVER_208 - SQL Server | Microsoft Learn
What is the value of the SQLERRMC variable after the select? This should provide a message related to the error.
Is it the same user accessing the database? One of the reasons for this error could be that the user does not have the correct permissions to execute a SELECT statement.
You could turn on an ODBC trace on the system where it works and the one that fails and compare them to see what is different.
$SET SQL(ODBCTRACE=ALWAYS)
------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------
Reply to Group Online Reply to Group via Email Reply to Sender Online View Thread Forward Flag as Inappropriate Post New Message Online Post New Message via Email
You may want to try the ODBC Driver 17 for SQL Server instead of the Native Client 11 on the newer system or try the ODBC trace to investigate the problem.,
Please be aware that Net Express has never been tested in this environment so there are no guarantees it will work.
You should upgrade to Visual COBOL which is supported under these newer environments.
Thanks
------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------
You may want to try the ODBC Driver 17 for SQL Server instead of the Native Client 11 on the newer system or try the ODBC trace to investigate the problem.,
Please be aware that Net Express has never been tested in this environment so there are no guarantees it will work.
You should upgrade to Visual COBOL which is supported under these newer environments.
Thanks
------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------
Hello, Chris
He eliminado la conexión ODBC SQL Server Native Client 11
Y he creado las conexiones con ODBC Driver 17 for SQL Server y ODBC Driver 18 for SQL Server 64bit con éxito
Con NetExpres sigue el problema.
He migrado el proyecto .app en NE a una solucion VS en Visual Cobol v.9, lo he recompilado, y al probar a ejecutarlo el problema es el mismo.
He insertado la instrucción $SET SQL(ODBCTRACE=ALWAYS) y compilado.
Y al ejecutar el problema es el mismo.
Adjunto MfSQLTRACE.LOG,
Veo que el nombre de la tabla a la que hace referencia la SELECT dice que no es válido (El nombre de objeto 'tbEmpresas' no es valido)
Y con el SSMS aparece
Gracias anticipadas.
Saludos cordiales
Goyo Arroyo
De: Chris Glazier via Rocket Software Forum
Enviado el: jueves, 13 de febrero de 2025 17:36
Para: goyoarroyog@gmail.com
Asunto: RE: Rocket® Net Express/Server Express (formerly a Micro Focus® product) : error SQL CODE -00000208
You may want to try the ODBC Driver 17 for SQL Server instead of the Native Client 11 on the newer system or try the ODBC trace to investigate the... -posted to the "Rocket® Net Express/Server Express (formerly a Micro Focus® product)" forum
Invite colleagues to join Rocket Forum and expand our expert network!
_____
Rocket® Net Express/Server Express (formerly a Micro Focus® product)
Post New Message Online Post New Message
Invite your colleagues to join the Rocket Forum and grow our expert network. Share this link.
Re: error SQL CODE -00000208
Reply to Group Online
Reply to Group
Reply to Sender
Reply to Sender via Email
Feb 13, 2025 11:26 AM
Chris Glazier
You may want to try the ODBC Driver 17 for SQL Server instead of the Native Client 11 on the newer system or try the ODBC trace to investigate the problem.,
Please be aware that Net Express has never been tested in this environment so there are no guarantees it will work.
You should upgrade to Visual COBOL which is supported under these newer environments.
Thanks
------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------
Reply to Group Online Reply to Group via Email Reply to Sender Online View Thread Forward Flag as Inappropriate Post New Message Online Post New Message via Email
Hello, Chris
He eliminado la conexión ODBC SQL Server Native Client 11
Y he creado las conexiones con ODBC Driver 17 for SQL Server y ODBC Driver 18 for SQL Server 64bit con éxito
Con NetExpres sigue el problema.
He migrado el proyecto .app en NE a una solucion VS en Visual Cobol v.9, lo he recompilado, y al probar a ejecutarlo el problema es el mismo.
He insertado la instrucción $SET SQL(ODBCTRACE=ALWAYS) y compilado.
Y al ejecutar el problema es el mismo.
Adjunto MfSQLTRACE.LOG,
Veo que el nombre de la tabla a la que hace referencia la SELECT dice que no es válido (El nombre de objeto 'tbEmpresas' no es valido)
Y con el SSMS aparece
Gracias anticipadas.
Saludos cordiales
Goyo Arroyo
De: Chris Glazier via Rocket Software Forum
Enviado el: jueves, 13 de febrero de 2025 17:36
Para: goyoarroyog@gmail.com
Asunto: RE: Rocket® Net Express/Server Express (formerly a Micro Focus® product) : error SQL CODE -00000208
You may want to try the ODBC Driver 17 for SQL Server instead of the Native Client 11 on the newer system or try the ODBC trace to investigate the... -posted to the "Rocket® Net Express/Server Express (formerly a Micro Focus® product)" forum
Invite colleagues to join Rocket Forum and expand our expert network!
_____
Rocket® Net Express/Server Express (formerly a Micro Focus® product)
Post New Message Online Post New Message
Invite your colleagues to join the Rocket Forum and grow our expert network. Share this link.
Re: error SQL CODE -00000208
Reply to Group Online
Reply to Group
Reply to Sender
Reply to Sender via Email
Feb 13, 2025 11:26 AM
Chris Glazier
You may want to try the ODBC Driver 17 for SQL Server instead of the Native Client 11 on the newer system or try the ODBC trace to investigate the problem.,
Please be aware that Net Express has never been tested in this environment so there are no guarantees it will work.
You should upgrade to Visual COBOL which is supported under these newer environments.
Thanks
------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------
Reply to Group Online Reply to Group via Email Reply to Sender Online View Thread Forward Flag as Inappropriate Post New Message Online Post New Message via Email
Adjunto archivos
------------------------------
GREGORIO ARROYO GONZALEZ
Gerente
Rocket Forum Shared Account
------------------------------
Adjunto archivos
------------------------------
GREGORIO ARROYO GONZALEZ
Gerente
Rocket Forum Shared Account
------------------------------
It looks like your table name is prefaced with the schema name ".dbo" in the database.
Does it look like this in your old database?
Try adding it to the name in the SELECT:
[dbo].[tbEmpresas]
------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------
It looks like your table name is prefaced with the schema name ".dbo" in the database.
Does it look like this in your old database?
Try adding it to the name in the SELECT:
[dbo].[tbEmpresas]
------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------
Hello Chris,
probando con Visual Cobol v9.0 e insertando [dbo] y sin
y continua el error -208 al ejecutar la Select
Saludos
------------------------------
GREGORIO ARROYO GONZALEZ
Gerente
Rocket Forum Shared Account
------------------------------
Hello Chris,
probando con Visual Cobol v9.0 e insertando [dbo] y sin
y continua el error -208 al ejecutar la Select
Saludos
------------------------------
GREGORIO ARROYO GONZALEZ
Gerente
Rocket Forum Shared Account
------------------------------
I can see in the ODBC trace that the default database is being set to "master" which is not the database in which the table exists, which from your screenshot is AGEDI
"[Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Se cambi\\ff el contexto de la base de datos a 'master'."
Try changing the default database context in your DSN.
You also have the case of the key column incorrect "Code_em" when it should be "code_em"
If you try running the same select statement against the master database in SSMS does it work?
------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------
Hello Chris,
probando con Visual Cobol v9.0 e insertando [dbo] y sin
y continua el error -208 al ejecutar la Select
Saludos
------------------------------
GREGORIO ARROYO GONZALEZ
Gerente
Rocket Forum Shared Account
------------------------------
Hola, Chris
Ya he conseguido solucionar el problema.
El problema estaba en la configuración de la conexion ODBC driver form SQL Server 18.0, que en BD no habia que indicar "Default" sino la BD especifica.
Despues de eso, funciona tanto en NE como VC.
Adjunto pantallazo
Gracias.
------------------------------
GREGORIO ARROYO GONZALEZ
Gerente
Rocket Forum Shared Account
------------------------------