|
Home > Archive > MS SQL Server ODBC > May 2005 > ODBC and MSDE
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Audrius 2005-05-01, 8:23 pm |
| 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 MySQL DB server, such problem doesn't
introduce itself... Does anyone know how to manage this?
Thank you,
Audrius
| |
| Audrius 2005-05-01, 8:23 pm |
| Audrius wrote:
> 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 MySQL DB server, such problem doesn't
> introduce itself... Does anyone know how to manage this?
>
> Thank you,
> Audrius
When I tried to insert data into MSDE table using console, everything
worked fine. The data occupies exactly as it should ("MySQL" - 5
symbols). But when I do this using ODBC from my application, it doesn't
work right. Can anyone suggest me a solution?
| |
| Audrius 2005-05-01, 8:23 pm |
| Audrius wrote:
> Audrius wrote:
>
>
>
> When I tried to insert data into MSDE table using console, everything
> worked fine. The data occupies exactly as it should ("MySQL" - 5
> symbols). But when I do this using ODBC from my application, it doesn't
> work right. Can anyone suggest me a solution?
The problem was solved.
|
|
|
|
|