Solved

(Delphi5 + MySQL) with MyOLEDB

Posted on 2001-07-26
8
221 Views
Last Modified: 2010-04-06
When i use MyOLEDB connect to MySQL via ADOConnect,
Some problem i found:

   ADOQuery.SQL.Clear;
   ADOQuery.SQL.Add('INSERT INTO .. VALUE(.., :NAME, ..)');
   ADOQuery.Parameters.ParamValues['NAME']:=''''+s+'''';
   ADOQuery.ExecSQL;
 
'NAME' is a String Field, Param must fix "'" when it's
Type is NOT integer. But how can i operate with BLOB Field


Has any better and easy way to access MySQL via ADO
(but ODBC, BDE)?

   
0
Comment
Question by:OopsWare
  • 3
  • 3
8 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6321047
>'NAME' is a String Field, Param must fix "'" when it's
>Type is NOT integer

you can use
quotedstr(s)
instead

blobs should go similar,
but as i don't use ado, i cannot show how

meikl ;-)
0
 
LVL 22

Accepted Solution

by:
mnasman earned 50 total points
ID: 6321118
Hello

  for insert blow field into the database i use this code

Query1.Params[0].LoadFromFile('c:\pic.jpg',ftBlob);

this is to insert image into oracle database

Mohammed
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6321151
:-))
whats a blow field, mohammed ?
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 27

Expert Comment

by:kretzschmar
ID: 6321164
just kidding, mohammed :-))
0
 
LVL 22

Expert Comment

by:mnasman
ID: 6321189
lol, i mean blob field meikl ;O)
0
 
LVL 22

Expert Comment

by:mnasman
ID: 6321207
I know meikl :o)
0
 
LVL 26

Expert Comment

by:Russell Libby
ID: 8733805
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept mnasman's comment as answer

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Thank you,
Russell

EE Cleanup Volunteer
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now