You can translate the question and the replies:

Properties of ODBC driver

We are developing a project where we have to connect to our Denodo server from a Python script. We basically load the ODBC driver dynamically, connect to the server and then send the query. Very standard process. Here is the snippent of code where we do this: ``` import clr import System clr.AddReference("System.Data") from System.Data import DataSet from System.Data.Odbc import OdbcConnection, OdbcDataAdapter connectString = ( "DRIVER={DenodoODBC ANSI(x64)};" "SERVER=myserver;" "PORT=9996;" "DATABASE=mydatabase;" "Username=admin;" "Password=admin;" ) query = "SELECT * FROM myinterface" connection = OdbcConnection(connectString) adaptor = OdbcDataAdapter(query, connection) dataSet = DataSet() connection.Open() adaptor.Fill(dataSet) connection.Close() ``` That works just fine and gets the data. However, we need to change some properties of the ODBC connection we create on the fly. We think we can do that in the connection string; however, we do not have the correct syntax. We did the most intuitive thing which was to use the names we see in the ODBC driver. One of the parameters we need to change is the fetch size so we did: ``` connectString = ( "DRIVER={DenodoODBC ANSI(x64)};" "SERVER=myserver;" "PORT=9996;" "DATABASE=mydatabase;" "Username=admin;" "Password=admin;" "chunkSize=10000;" ) ``` That did not work. We also tried this: ``` connectString = ( "DRIVER={DenodoODBC ANSI(x64)};" "SERVER=myserver;" "PORT=9996;" "DATABASE=mydatabase;" "Username=admin;" "Password=admin;" "FETCH=10000;" ) ``` That did not work either. So, if someone knows the correct syntax for these properties, or any other way to change the propeties in the code, please let me know. Thanks!
30-09-2020 22:34:13 -0400

1 Answer

Hi It is possible to create a DSN less connection in Denodo. In order to add additional parameters for the ODBC connection, I would use the correct syntax as mentioned in the document [Creating DSN-Less Connection]( of the Virtual Dataport Developer guide. Please note that when defining these there should be no space between the names of the parameters, the equal sign, the values, the semicolon etc. Hope this helps !
Denodo Team
06-10-2020 08:28:10 -0400
You must sign in to add an answer. If you do not have an account, you can register here