database record problem for delphi 7

Forum related to MySQL

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
capella
Fresh Boarder
Fresh Boarder
Posts: 14
Joined: 03.11.2006, 23:05

database record problem for delphi 7

Post by capella »

my problem is database record problem , query is running but record is not running program compiled then program is opening but when I click the record button Program give me error this error

Image

I am using mysql 4.1
how can I solve my problem?? Please help me...
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Can you tell us more about the query that is failing? This is a query syntax error. So did Zeoslib itself generate the wrong query or have you written the query yourself in the query component's sql property?

First thing you could do is writing a log of what's actually sent to the server by dropping a ZSqlMonitor component in your form and logging all data to a file. Just specify a filename, set autosave and active to true and that should do the trick. Then you can try to find out why mysql doesn't accept the query sent. Forgot some quotes? Bad function used? ...

Mark
capella
Fresh Boarder
Fresh Boarder
Posts: 14
Joined: 03.11.2006, 23:05

Post by capella »

you are to be right....
error page name is zdbcmysqlutils..this page has got many writing ...these are

}
procedure CheckMySQLError(PlainDriver: IZMySQLPlainDriver;
Handle: PZMySQLConnect; LogCategory: TZLoggingCategory; LogMessage: string);
var
ErrorMessage: string;
ErrorCode: Integer;
begin
ErrorMessage := Trim(StrPas(PlainDriver.GetLastError(Handle)));
ErrorCode := PlainDriver.GetLastErrorCode(Handle);
if (ErrorCode <> 0) and (ErrorMessage <> '') then
begin
DriverManager.LogError(LogCategory, PlainDriver.GetProtocol, LogMessage,
ErrorCode, ErrorMessage);
raise EZSQLException.CreateWithCode(ErrorCode,
Format(SSQLError1, [ErrorMessage]));
end;
end;

end
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Yes, That's where your program stops.
I wanted to know what's sent to the server, however. That's why yu have to make a trace using the TZSQLMonitor component.

Mark
zippo
Silver Boarder
Silver Boarder
Posts: 322
Joined: 12.10.2005, 18:01
Location: Slovenia

Post by zippo »

What's the exact SQL sentence that you are trying to execute?
Post Reply