Skip to Content
0
Former Member
Oct 18, 2006 at 10:55 AM

Accessing MS SQL Database using DBCON

120 Views

Hello!

I have a problem when we try to connect to MS SQL Server using DBCON.

In table DBCON I had configure the connection lika this:

MSSQL_SERVER=tcp:<server_ip> MSSQL_DBNAME=<database>

I also have the ABAP program. It is giving a return code of 4 after 'Connect to'.

I can read in SAP system log that is the "Problem in SAP BASIS" and is "No shared library found for the database".

Here is a sample of my program:

report ztest_baza .

data: dbn(128).

EXEC SQL.

SET CONNECTION 'CON'

ENDEXEC.

if sy-subrc eq 0.

write: 'connection ok'

else

write: 'connection error'.

endif.

EXEC SQL.

CONNECT TO 'CON'

ENDEXEC.

if sy-subrc eq 0.

write: 'connection ok'

else

write: 'connection error'.

endif.

Can somebody help me??