MySQL and Delphi5

MySQL and Delphi5

Post by Steve Lee-Woo » Sun, 31 Dec 1899 09:00:00



I have a field in a MySQL data table set up as a longtext type. On my
Delphi form I need to use a standard memo component for the user to enter
the text, which is then written to the data table via a parameterised SQL
insert query.

The question is: How do I assign the value of the Memo to the query?

I've tried variants along the lines of:
Query1.ParamByName('Update1').AsString := Memo1.Lines;
But I just get type mismatch errors.

Anyone provide a solution?

TIA
--
Stephen Lee-Woolf
Academic Information Services
University of Salford
Salford, Manchester

 
 
 

MySQL and Delphi5

Post by S?ren Buchtru » Sun, 31 Dec 1899 09:00:00


Hi
Use this for the first line in your memofield:
memo1.Lines.Strings[0]
and this for the second line:
memo1.Lines.Strings[1]

and so on.

Hope you can use it!

Best regards
Soren, Denmark


Quote:> I have a field in a MySQL data table set up as a longtext type. On my
> Delphi form I need to use a standard memo component for the user to enter
> the text, which is then written to the data table via a parameterised SQL
> insert query.

> The question is: How do I assign the value of the Memo to the query?

> I've tried variants along the lines of:
> Query1.ParamByName('Update1').AsString := Memo1.Lines;
> But I just get type mismatch errors.

> Anyone provide a solution?

> TIA
> --
> Stephen Lee-Woolf
> Academic Information Services
> University of Salford
> Salford, Manchester


 
 
 

MySQL and Delphi5

Post by Jan » Sun, 31 Dec 1899 09:00:00


Just do the following :
           Query1.ParamByName('Update1').AsString := Memo1.Text;
This works fine.

By;



Quote:> I have a field in a MySQL data table set up as a longtext type. On my
> Delphi form I need to use a standard memo component for the user to enter
> the text, which is then written to the data table via a parameterised SQL
> insert query.

> The question is: How do I assign the value of the Memo to the query?

> I've tried variants along the lines of:
> Query1.ParamByName('Update1').AsString := Memo1.Lines;
> But I just get type mismatch errors.

> Anyone provide a solution?

> TIA
> --
> Stephen Lee-Woolf
> Academic Information Services
> University of Salford
> Salford, Manchester

 
 
 

1. problems with windows 2000, delphi5, dbe and oracle 8

We developed an application in a NT4 environment with Delphi 5, using the
BDE (not ADO) and an Oracle 7.3 database server. So far so good.

When we migrated our server to Oracle 8 we got several problems like
'ORA-01410 invalid ROWID' and some more, but we could resolve these problems
with te latest BDE version.

But now we migrated to Windows 2000 a new problems occur: Selecting rows
works well, but when we try to updated records an access violoation occurs
in Oracle8client.dll.

It seems to me that the combination Windows 2000, Delphi5, BDE and Oracle 8
is not unusual..... Does anyone have the same problem(s) and knows what to
do ?

Personally, I think the BDE is causing all the problems... but I'm not sure.
Maybe we should replace queries with ADOqueries ?

Please, who can help us ???

Tips and ideas are very welcome !!
Thanks,
Johan

2. Importing uneven records

3. Oracle + Delphi5: Transactions and Locking

4. Mixing row order

5. Delphi5 tutorial

6. quick and painless Windows 95 installer

7. Oracle + Delphi5: Transactions and Locking

8. SQL7 & the internet

9. Delphi5 Database question, HELP?

10. PARADOX - DELPHI5 - CORRUPT TABLE / INDEX HEADER

11. Can Delphi5 run under OS/2 warp 4 ???

12. ClientDataSets con Delphi5 Enterprise

13. oracle, ado, delphi5