Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 8 of 8 total
Thread JavaException: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid string or buffer leng
Wed, Feb 5 2020 4:36 AMPermanent Link

Hosam

MEMITS Solutions

Hello,
I'm using DBISAM ODBC version 4.48.00.07
with JRE version java version "1.7.0_80"    because it is supporting JDBC-ODBC bridge

but I'm facing connectivity error
JavaException: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid string or buffer length

can anyone please explain to me how I can fix that ?!!!

Regards,
Hisham
Wed, Feb 5 2020 4:42 AMPermanent Link

Hosam

MEMITS Solutions

Hosam wrote:

Hello,
I'm using DBISAM ODBC version 4.48.00.07
with JRE version java version "1.7.0_80"    because it is supporting JDBC-ODBC bridge

but I'm facing connectivity error
JavaException: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid string or buffer length

can anyone please explain to me how I can fix that ?!!!


I'm using   ODBC 64 bit  with   JRE  64 bit
Thu, Feb 6 2020 9:04 AMPermanent Link

Chris Holland

SEC Solutions Ltd.

Avatar

Team Elevate Team Elevate

Hi Hosam,

Is the problem in connecting or in executing some SQL?

If it is in connecting can you post your connection string here please?

Chris Holland
[Team Elevate]

Hosam wrote:

Hello,
I'm using DBISAM ODBC version 4.48.00.07
with JRE version java version "1.7.0_80"    because it is supporting JDBC-ODBC bridge

but I'm facing connectivity error
JavaException: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid string or buffer length

can anyone please explain to me how I can fix that ?!!!


I'm using   ODBC 64 bit  with   JRE  64 bit
Chris Holland
[Team Elevate]
Sat, Feb 8 2020 3:42 AMPermanent Link

Hosam

MEMITS Solutions

Hello,
I'm using Mirth interface engine which is based on Java technology

the connection string is   :

dbConn = DatabaseConnectionFactory.createDatabaseConnection('sun.jdbc.odbc.JdbcOdbcDriver','jdbcSurprisedbc:EM_Conn_Testing','Admin','DBAdmin');


"EM_Conn_Testing"    is the  ODBC connection name to  DBISAM DB

the problem is not in the connection  it is working fine  sometimes but in other times it gives  errors
I test it using 32 JRE   it is working fine also  but some times  the MIRTH engine is crashed when it tries to connect to  DBISAM using ODBC

my question now is   DBISAM ODBC driver should be stable when working with JAVA or the problem can be from other sources ?!

is ODBC stable enough to develop a heavy application using it?
is C#  better than  JAVA  for developing an application that connected to DBISAM ?!
because we don't have programmers from our team who know  Delphi !!

any suggestions from your side, please ?!
Mon, Feb 10 2020 4:34 AMPermanent Link

Chris Holland

SEC Solutions Ltd.

Avatar

Team Elevate Team Elevate

Hi Hosam,

I use C# (and .NET) with the ODBC driver for very disk intensive applications and it is rock solid with multiple users.

Chris Holland
[Team Elevate]

Hosam wrote:

Hello,
I'm using Mirth interface engine which is based on Java technology

the connection string is   :

dbConn = DatabaseConnectionFactory.createDatabaseConnection('sun.jdbc.odbc.JdbcOdbcDriver','jdbcSurprisedbc:EM_Conn_Testing','Admin','DBAdmin');


"EM_Conn_Testing"    is the  ODBC connection name to  DBISAM DB

the problem is not in the connection  it is working fine  sometimes but in other times it gives  errors
I test it using 32 JRE   it is working fine also  but some times  the MIRTH engine is crashed when it tries to connect to  DBISAM using ODBC

my question now is   DBISAM ODBC driver should be stable when working with JAVA or the problem can be from other sources ?!

is ODBC stable enough to develop a heavy application using it?
is C#  better than  JAVA  for developing an application that connected to DBISAM ?!
because we don't have programmers from our team who know  Delphi !!

any suggestions from your side, please ?!
Chris Holland
[Team Elevate]
Wed, Feb 12 2020 1:38 PMPermanent Link

Hosam

MEMITS Solutions

Hello Chris
we developed a c# windows service to get the data from DBISAM and put it in MySQL to be used by Mirth (JAVA integration engine )

the app working fine inside the C# visual studio but when we run it as a stand-alone service it gives us the below-attached error:

the connection string is simply as  :

private static readonly string connectionStgDBisam = "DSN=EM_Conn_Testing2";


any suggestions to fix that, please ?!










System.Data.Odbc.OdbcException (0x80131937): ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
  at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
  at System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection connection, OdbcConnectionString constr, OdbcEnvironmentHandle environmentHandle)
  at System.Data.Odbc.OdbcConnectionOpen..ctor(OdbcConnection outerConnection, OdbcConnectionString connectionOptions)
  at System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
  at System.Data.ProviderBase.DbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
  at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
  at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
  at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
  at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
  at System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
  at System.Data.Odbc.OdbcConnection.Open()
Wed, Feb 12 2020 1:59 PMPermanent Link

Raul

Team Elevate Team Elevate

On 2/12/2020 1:38 PM, Hosam wrote:

> we developed a c# windows service to get the data from DBISAM and put it in MySQL to be used by Mirth (JAVA integration engine )
>
> the app working fine inside the C# visual studio but when we run it as a stand-alone service it gives us the below-attached error:
>
> the connection string is simply as  :
>
> private static readonly string connectionStgDBisam = "DSN=EM_Conn_Testing2";
>
> any suggestions to fix that, please ?!
>


The error "Data source name not found" would be one to tackle - your DSN
is not properly setup in Windows would be my guess.

most likely DSN is defined for current user only (and service would not
be able to see it) or you have a 32bit DSN and 64bit service or vice versa.

Raul
Wed, Feb 12 2020 2:54 PMPermanent Link

Hosam

MEMITS Solutions

Hello  Raul,
Thanks a lot,
it is working fine now Smile
Image