cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP B1 Integration with Python (Windows)

Former Member
0 Likes
1,260

Is there a recommended module for connecting to SAP B1?

I only need to retrieve data (not modify) to create reports.

I've heard of pyodbc and cdata.sap but I'm not sure which route to go.

I would prefer something that's free.

-JJ

Accepted Solutions (1)

Accepted Solutions (1)

msundararaja_perumal
Active Contributor
0 Likes

You may try like the below example with pyodbc

import pyodbc 
# Some other example server values are
# server = 'localhost\sqlexpress' # for a named instance
# server = 'myserver,port' # to specify an alternate port
server = 'tcp:myserver.database.windows.net' 
database = 'mydb' 
username = 'myusername' 
password = 'mypassword' 
cnxn = pyodbc.connect('DRIVER={ODBC Driver 17 for SQL Server};SERVER='+server+';DATABASE='+database+';UID='+username+';PWD='+ password)
cursor = cnxn.cursor()

Thanks.

Former Member
0 Likes

Thanks Sundararaja,

I was able to connect.

Answers (0)