 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Bill Saffin Guest
|
Posted: Sat Oct 21, 2006 5:12 am Post subject: MySQL text field lengths truncated |
|
|
I'm new to MySQL development. I'm using Delphi 7, ADO components, connecting
to a remote MySQL server 4.1.10.
I've got a text field in a table in the database. When I use varchar(255)
for the type, I get 255 characters in the field. When I try other text types
(Medium Text, Long Text) with larger numbers specified (I've tried 512,
1024, 4096), I can't get more than 162 characters. I checked this by adding
fields to the query (edit the field list).
I've searched for this type of error, but can't find a solution. I can't use
a longer varchar type because the web hosting company isn't ready to move to
MySQL 5.
Anybody solve this type of problem? |
|
| Back to top |
|
 |
Guillem Guest
|
Posted: Mon Oct 23, 2006 3:21 pm Post subject: Re: MySQL text field lengths truncated |
|
|
Bill Saffin wrote:
| Quote: | I'm new to MySQL development. I'm using Delphi 7, ADO components,
connecting to a remote MySQL server 4.1.10.
I've got a text field in a table in the database. When I use
varchar(255) for the type, I get 255 characters in the field. When I
try other text types (Medium Text, Long Text) with larger numbers
specified (I've tried 512, 1024, 4096), I can't get more than 162
characters. I checked this by adding fields to the query (edit the
field list).
I've searched for this type of error, but can't find a solution. I
can't use a longer varchar type because the web hosting company isn't
ready to move to MySQL 5.
Anybody solve this type of problem?
|
How are you accessing the MySQL server? What does your connection
string look like? What kind of field are you trying to use (in your
app, not in the MySQL server)?
--
Best regards :)
Guillem Vicens Meier
Dep. Informatica Green Service S.A.
www.clubgreenoasis.com
--
Contribute to the Indy Docs project: http://docs.indyproject.org
--
In order to contact me remove the -nospam |
|
| Back to top |
|
 |
Bill Saffin Guest
|
Posted: Tue Oct 24, 2006 7:21 am Post subject: Re: MySQL text field lengths truncated |
|
|
Here's the connection string (using TAdoConnection):
Provider=MSDASQL.1;Password=****;Persist Security Info=True;User
ID=****;Data Source=LeoKevinIssues
I've connected the field in question to a TDBMemo component. The first error
message I received said it was expecting a memo field but it was actually a
string.
"Guillem" <guillemvicens-nospam (AT) clubgreenoasis (DOT) com> wrote in message
news:453c97c3$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Bill Saffin wrote:
I'm new to MySQL development. I'm using Delphi 7, ADO components,
connecting to a remote MySQL server 4.1.10.
I've got a text field in a table in the database. When I use
varchar(255) for the type, I get 255 characters in the field. When I
try other text types (Medium Text, Long Text) with larger numbers
specified (I've tried 512, 1024, 4096), I can't get more than 162
characters. I checked this by adding fields to the query (edit the
field list).
I've searched for this type of error, but can't find a solution. I
can't use a longer varchar type because the web hosting company isn't
ready to move to MySQL 5.
Anybody solve this type of problem?
How are you accessing the MySQL server? What does your connection
string look like? What kind of field are you trying to use (in your
app, not in the MySQL server)?
--
Best regards :)
Guillem Vicens Meier
Dep. Informatica Green Service S.A.
www.clubgreenoasis.com
--
Contribute to the Indy Docs project: http://docs.indyproject.org
--
In order to contact me remove the -nospam
|
|
|
| Back to top |
|
 |
Guillem Guest
|
Posted: Tue Oct 24, 2006 1:49 pm Post subject: Re: MySQL text field lengths truncated |
|
|
Bill Saffin wrote:
| Quote: | Here's the connection string (using TAdoConnection):
Provider=MSDASQL.1;Password=****;Persist Security Info=True;User
ID=****;Data Source=LeoKevinIssues
|
ok, so you're accessing to MySQL as local database using ODBC, right?
In this case:
- make sure you have the latest MyODBC version. I remember having
serious issues with dates with the last version I used, which was 3.51.
Can't tell if there was any problem with large strings, though. AFAIK
they are testing now version 5.05
- I see you are missing the OPTION parameter in the connection string.
Take a look at the following URLs and check if you need to set any of
the options. Either case, OPTION=3 is a good beginning and won't hurt.
http://www.connectionstrings.com/
http://dev.mysql.com/doc/refman/5.0/en/myodbc-configuration-connection-p
arameters.html
| Quote: | I've connected the field in question to a TDBMemo component. The
first error message I received said it was expecting a memo field but
it was actually a string.
|
a TDBMemo is well suited for text BLOBs and long alphanumeric fields.
That shouldn't be the issue. How are you connecting it?
--
Best regards :)
Guillem Vicens Meier
Dep. Informatica Green Service S.A.
www.clubgreenoasis.com
--
Contribute to the Indy Docs project: http://docs.indyproject.org
--
In order to contact me remove the -nospam |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|