JDBC-ODBC and MS SQL

A

Audrius

Hello,

I'm not sure if it is right group for this question, but I hope that
I'll get help here...

I'm using MSDE to store data for my application. And I'm having such
problem. I'm creating a table in DB for string connection information:

CREATE TABLE sql (
action_id int NOT NULL default '0',
database_name varchar(20) NOT NULL default '',
username varchar(15) NOT NULL default '',
password varchar(15) NOT NULL default '',
PRIMARY KEY (action_id)
);

Field 'database_name' stands for the DB name used by ODBC (In my Java
application I'm using ODBC, to connect to particular DB). So when I'm
adding a record to this table, for instance:
1, "MySQL", "root", "password"
ODBC || MSDE || JDBC changes the values by adding free space to fill
all the field's spaces (Instead of "MySQL" it adds "MySQL
"). It seems like some component doesn't understand that I'm using
varchar(20), not char.

For instance, when I'm using ODBC to connect to MySQL DB server, such
problem doesn't introduce itself... Does anyone know how to manage
this?

Thank you,
Audrius
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top