Page 1 of 1

How to issue SQL sentence?

Posted: Thu 22 Dec 2005 13:42
by kondo
Hello. It is Kondo.
I am Japanese, and in English, it is terrible and not good.

It develops with VisualStudio.NET2003 by C#.

Please teach how to issue SQL sentence that uses MySQLDirect.NET.

Please write an easy program that acquires it and one record and displays it in Dauarogboccs.

I hope.

(When sentences are improper, I'm sorry because the translation software is used.)

Posted: Thu 22 Dec 2005 14:05
by Serious
MySQLDirect .NET installation package includes various sample projects in C#, MC++, VB.NET, Delphi.

If you want additional demo project please specify in details what exactly you need (actually we did not understand what is the 'sentence' int your request (query or statement?) and what is 'Dauarogboccs').

Posted: Thu 22 Dec 2005 14:14
by kondo
Thank you for replying.


create table test_tbl (
hogeid int unsigned not null auto_increment,
f_name char(255) not null,
f_city char(255) not null,
primary key(hogeid)
);

insert set f_name = 'kondo', f_city = 'japan';
insert set f_name = 'yamada', f_city = 'japan';

--------------------
select * from test_tbl where f_name = 'kondo';

The method where it is displayed by dialog in the above-mentioned SQL sentence as "kondo"?

select * from test_tbl;

The method of displaying all data in dialog by the above-mentioned SQL sentence?

Posted: Thu 22 Dec 2005 14:38
by Serious
To run 'CREATE ... INSERT' query it is better to use MySqlScript class. Use design-time features to become familiar with its functionality.

Common method of retrieving 'SELECT' result is to use MySqlDataAdapter or MySqlDataTable components. They also have reach design-time capabilities that can greatly simplify application development process for you.

As for MySQLDirect .NET samples. I think 'DataTable' demo project is what you need.
To test it perform following steps:
1 Go to %ProgramFiles%\CoreLab\MySQLDirect.NET\Samples\DbTable\ folder
2 Compile and run selected project (depends on programming language you use)
3 Connect to database, enter select query and get result