FenrisUlven
asked on
Getting startet with dbExpress
I have programed a MySql db application interfacing with ODBC and bde
The compnents i am using is only a normal "BDE" Query and dataset, in the query i use select, insert, update, delete ect. I Use the DataSet to show a dbGrid.
I am a bit tired of the ODBC an BDE interface, and because of that i want to change to dbExpress (I have upgaded Delphi to 6.01).
I have tried to reach the goal in to ways:
First:
1. I put a SQLConnection1 on my form
i set the drivername to MySql
i set the path to the vendor lib
i set params to mydb, password and user name
i set connected from false to true, and i make a
succesfull login
2. I put a SQLQuery1 on my form
I Set SQLConnection to SQLConnection1
I type in my sql string: SELECT * FROM MyTabel
I Set Active to true
3. I Put a Datsset on my form
I set DataSet to SQLQuery1
4 I Put a DBGrid1 on my form
I "TRY" to set the DataSourse to DataSet1,
But i get the Error operation not allowed on a
unidirectional dataset.
Second way:
1. I put a SQLConnection1 on my form
i set the drivername to MySql
i set the right path to the vendor lib
i set params to mydb, password and user name
i set connected fro false to true, and i make a
succesfull login
2. I put a SQLClientdataset on MyForm, connected it to
the SQLConnection.
as command text: SELECT * FROM MyTabel
but when i set the SQLClientSet activ i get the
error Unable to execute Query ???
I hope that someone here can give me a small guideline to reach my goal.
The compnents i am using is only a normal "BDE" Query and dataset, in the query i use select, insert, update, delete ect. I Use the DataSet to show a dbGrid.
I am a bit tired of the ODBC an BDE interface, and because of that i want to change to dbExpress (I have upgaded Delphi to 6.01).
I have tried to reach the goal in to ways:
First:
1. I put a SQLConnection1 on my form
i set the drivername to MySql
i set the path to the vendor lib
i set params to mydb, password and user name
i set connected from false to true, and i make a
succesfull login
2. I put a SQLQuery1 on my form
I Set SQLConnection to SQLConnection1
I type in my sql string: SELECT * FROM MyTabel
I Set Active to true
3. I Put a Datsset on my form
I set DataSet to SQLQuery1
4 I Put a DBGrid1 on my form
I "TRY" to set the DataSourse to DataSet1,
But i get the Error operation not allowed on a
unidirectional dataset.
Second way:
1. I put a SQLConnection1 on my form
i set the drivername to MySql
i set the right path to the vendor lib
i set params to mydb, password and user name
i set connected fro false to true, and i make a
succesfull login
2. I put a SQLClientdataset on MyForm, connected it to
the SQLConnection.
as command text: SELECT * FROM MyTabel
but when i set the SQLClientSet activ i get the
error Unable to execute Query ???
I hope that someone here can give me a small guideline to reach my goal.
Hello
The first problem I had it when I installed the delphi 6 for the first time, and i posted a question about it, and here's the questions with the answers
https://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=delphi&qid=20150879
The first problem I had it when I installed the delphi 6 for the first time, and i posted a question about it, and here's the questions with the answers
https://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=delphi&qid=20150879
ASKER
Thank you for your answer.
But i need 10 points to see it ;-((((
Maybe you could make a cut and paste and then put it here ?
But i need 10 points to see it ;-((((
Maybe you could make a cut and paste and then put it here ?
ASKER
Thank you for your answer.
But i need 10 points to see it ;-((((
Maybe you could make a cut and paste and then put it here ?
But i need 10 points to see it ;-((((
Maybe you could make a cut and paste and then put it here ?
I got two comments, here are you:
From: inthe Date: 07/15/2001 08:48AM PST
hi,
this may help:
http://groups.google.com/groups?hl=en&safe=off&ic=1&th=f6c9876a7adbeccf,6&seekm=3AC63F96.8A63AFA7%40billysdomain.co.uk#p
Comment
From: gemarti Date: 07/15/2001 08:50AM PST
I think you will have to use a TDataSet component capable of buffering returned data into memory if
you want to use the DBGrid. Use DataSetProvider and ClientDataSet to accomplish this.
The DBExpress components do not buffer returned data into memory; they only return unidirectional cursors
to the data.
From: inthe Date: 07/15/2001 08:48AM PST
hi,
this may help:
http://groups.google.com/groups?hl=en&safe=off&ic=1&th=f6c9876a7adbeccf,6&seekm=3AC63F96.8A63AFA7%40billysdomain.co.uk#p
Comment
From: gemarti Date: 07/15/2001 08:50AM PST
I think you will have to use a TDataSet component capable of buffering returned data into memory if
you want to use the DBGrid. Use DataSetProvider and ClientDataSet to accomplish this.
The DBExpress components do not buffer returned data into memory; they only return unidirectional cursors
to the data.
ASKER
Hej Mohammed
I have now connected to MySql with dbExpress, but i get an exeption from libmysql.dll when i run a query, maby i have the wrong version of the dll ?
My code is:
SQLQuery1.DisableControls;
SQLQuery1.SQL.Clear;
SQLQuery1.SQL.Add('UPDATE Intersec ' +
' SET IntName = ''' + Edit1.Text +'''' +
' WHERE Id = 6');
SQLQuery1.ExecSQL(False);
SQLQuery1.EnableControls;
And so far as i can see should it be ok.
any ideas ?
I have now connected to MySql with dbExpress, but i get an exeption from libmysql.dll when i run a query, maby i have the wrong version of the dll ?
My code is:
SQLQuery1.DisableControls;
SQLQuery1.SQL.Clear;
SQLQuery1.SQL.Add('UPDATE Intersec ' +
' SET IntName = ''' + Edit1.Text +'''' +
' WHERE Id = 6');
SQLQuery1.ExecSQL(False);
SQLQuery1.EnableControls;
And so far as i can see should it be ok.
any ideas ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
FenrisUlven:
This old question needs to be finalized -- accept an answer, split points, or get a refund. For information on your options, please click here-> http:/help/closing.jsp#1
EXPERTS:
Post your closing recommendations! No comment means you don't care.
This old question needs to be finalized -- accept an answer, split points, or get a refund. For information on your options, please click here-> http:/help/closing.jsp#1
EXPERTS:
Post your closing recommendations! No comment means you don't care.
points to me
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!
Thanks,
geobul
EE Cleanup Volunteer
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!
Thanks,
geobul
EE Cleanup Volunteer
ASKER