Solved

(Delphi5 + MySQL) with MyOLEDB

Posted on 2001-07-26
8
231 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:
Mohammed Nasman 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 27

Expert Comment

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

Expert Comment

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

Expert Comment

by:Mohammed Nasman
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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

831 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