cancel
Showing results for 
Search instead for 
Did you mean: 

connection to MYSQL

Former Member
0 Kudos

Hello

i want to connect to external MySQL DB using ABAP program.

I have maintained entry in DBCO transaction and configure the connection like this:

DB_Connection MYSQL

DBS MSS

USername xxxxxxx

Password xxxxx/xxxxx

connection info MSSQL_SERVER=10.58.194.134 MSSQL_DBNAME=helpdeskportal OBJECT_SOURCE=helpdeskportal

Report:

DATA: con_name TYPE dbcon-con_name VALUE 'MYSQL'.

DATA: wa_spfli TYPE spfli-carrid.

EXEC SQL.

set connection: con_name

ENDEXEC.

if sy-subrc ne 0.

message e000(z_msg) with 'Connection not opened'.

else.

EXEC SQL.

connect to: con_name.

ENDEXEC.

endif.

IF sy-subrc NE 0.

*error handling

ELSE.

EXEC SQL PERFORMING evaluate.

select carrid from spfli into :wa_spfli.

ENDEXEC.

ENDIF.

EXEC SQL.

set connection default

ENDEXEC.

&----


*& Form EVALUATE

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM evaluate .

WRITE / wa_spfli.

ENDFORM.

when i am trying to process set connection: con_name program is getting terminated. please help.

Regards,

Himangshu

Accepted Solutions (1)

Accepted Solutions (1)

markus_doehr2
Active Contributor
0 Kudos

MySQL != MS-SQL

Markus

Answers (2)

Answers (2)

Former Member
0 Kudos

how to find out whether ddmssslib.dll is installed on the system or not.

thanks & regards,

himangshu

markus_doehr2
Active Contributor
0 Kudos

That library is usually in the kernel directory (\usr\sap\<SID>\SYS\exe\....)

Markus

Former Member
0 Kudos

Hi Markus,

Can you please tell me then how to connect to MYSQL.

i read creating DSN using ODBC 'll help. But how to do this.

Thanks,

Dheeraj

Former Member
0 Kudos