Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MaxDB - Everything about MaxDB, formerly known as SAP DB
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
MySQL++ - Programming with the C++ API to MySQL
ODBC - ODBC with the MySQL Connector/ODBC driver
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
mysql openssl Question
mysql:it 's a db not a dbms how it 's possible?!
Does the binary log enabling affect the MySQL performances?
Strange behavior, Table Level Permission
FULLTEXT query format question
Preventing Duplicate Entries
Comparing and writing out BLOBS
Executing MySQL Commands From Within C Program
Can 't access mysql after kernel upgrade
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Downgrade Mysql from 4 to 3 23
MySQL Cluster Software
mysql test 4 1 fails with the gis test
ERROR 2002: Can 't connect to local MySQL server through socket
Getting Identity after INSERT
Update one field with more fields from another table
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
mysql have same function mthod as Oracle decode()
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
Only inserting the first character???

Only inserting the first character???

2005-02-17       - By Schuhmacher, Bret

 Back
Hello all - I've checked the bug list and didn't see anything, so here goes...

I have the following dataset:

1009   Timeout/Invalid Entries. HRSC Top menu.
1010   0 out. Main NCAL menu.
1014   NCAL Employment Verification.
1019   Timeout/Invalid Entries. Main NCAL menu.
1024   NCAL Direct Deposit.
2050   0 out. SCAL Benefits menu.
2052   SCAL 401K plans.
2053   SCAL Life & LTD Insurance.
2054   SCAL Spending Accounts.
2055   SCAL Retirement Information.
2059   Timeout/Invalid Entries. SCAL Benefits menu.


When I attempt to insert this data into a MySQL table only the first character
of each column gets inserted.  I actually get this:
1   T
1   0
1   N
1   T
1   N
2   0
2   S
2   S
2   S
2   S
2   T

This is on Win2KAS, with MySQL v4.1, MyODBC 3.51.11.00.  My table is defined
with reasonable column sizes - they're not 1 char width columns ;-).

The application that uses the ODBC DSN and does the inserting has been well
tested with Oracle and TimesTen ODBC drivers.  This is my first attempt at
using MySQL with this application.

I have not looked at the source code, but it is as if the code that copies the
values into the ODBC parameters does this, assuming val is a char[]:
strcpy(buf, val); /* and the rc is not checked */

Instead of

strcpy(buf, *val);

Or maybe the buf is a char or something?  Hey, forgive my C, please - I've been
writing Java for awhile lately. ;-)

Is anyone else having problems with 3.51.11?  I would imagine this would be a
huge problem, so it must just be me...  I'll try some older ODBC drivers, I
guess.

Thanks for any insights or advice you can provide!

Rgds,

Bret
--
Bret A. Schuhmacher
Sr. Architect
Aspect Communications
1310 Ridder Park Drive
San Jose, CA? 95131
?
423.837.7563 Office/Mobile
www.aspect.com


--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe:    http://lists.mysql.com/myodbc?unsub=mysql@(protected)


Earn $52 per hosting referral at Lunarpages.