How to do an SQL SELECT in Delphi

  Рет қаралды 51,086

Mr Long Education - IT & CAT

Mr Long Education - IT & CAT

Күн бұрын

This explains how to use an SQL Select statement in Delphi by using the ADOQuery component. #MrLongEducation #Programming #SQL
SQL Video Series
SELECT Statements
Basics Part 1 - • SQL Basics - SELECT qu...
Basics Part 2 - • SQL Basics - SELECT qu...
Basics Part 3 - • SQL Basics - SELECT qu...
Basics Part 4 - • SQL Basics - SELECT qu...
Advanced Part 1 - • SQL Advanced - SELECT ...
Advanced Part 2 - • SQL Advanced - SELECT ...
Advanced Part 3 - • SQL Advanced - SELECT ...
Advanced Part 4 - • SQL Advanced - SELECT ...
Advanced Part 5 - • SQL Insert
SELECT in Delphi - • How to do an SQL SELEC...
INSERT Statement - • SQL Insert
UPDATE Statement - • SQL Update
DELETE Statement - • SQL Delete
INSERT in Delphi - • How to do an SQL INSER...
UPDATE in Delphi - • How to do an SQL UPDAT...
DELETE in Delphi - • How to do an SQL DELET...

Пікірлер: 49
@Connor-ec5vs
@Connor-ec5vs 5 жыл бұрын
You are the reason I will pass my exam tomorrow
@jameswheeler9945
@jameswheeler9945 6 жыл бұрын
Keep doing what yer doing, man. Helping a lot of people!
@memelordnord8861
@memelordnord8861 5 жыл бұрын
you make IT at school so much easier. Keep it up
@mysticware3496
@mysticware3496 5 жыл бұрын
You my man , have helped in such a way that i think you deserve an award.
@jackybrancken6313
@jackybrancken6313 6 жыл бұрын
Thank you thank you thank you! I thought I was going to fail my test on this on Monday but this helped me understand everything soooooo much better!!
@卡机不
@卡机不 2 жыл бұрын
Thank you so much!! You saved my day man!
@clappedcorsac1024
@clappedcorsac1024 3 жыл бұрын
i wish my IT teacher was as good at explsining as you bro
@Damz_19
@Damz_19 4 ай бұрын
Thank you ,this video helped me so much❤
@NqobileNxumalo-wq3wn
@NqobileNxumalo-wq3wn 4 ай бұрын
Thank you Mr long........!
@nathannaidoo8524
@nathannaidoo8524 4 жыл бұрын
I finally understand. Thanks so much
@dedicationmotivation8408
@dedicationmotivation8408 2 жыл бұрын
Beyond helpful🙏
@rakhirathore4954
@rakhirathore4954 4 жыл бұрын
Thank you! its very helpful! How do I extract data from dbgrid to put it on a dbText ? I set the data source, but DateField says missing SQL
@ameeraakmalia3260
@ameeraakmalia3260 6 жыл бұрын
hi. i followed your tutorial, but when i run the application and click the find button, there is no data displayed on the dbgrid. do you have any idea how to fix this? thanks.
@travisfuller9393
@travisfuller9393 5 жыл бұрын
The DBGrid should have a property in the object inspector (Data Source) which should be set to the Data Source on the data module which has been connected to the query (with the SQL)
@darvazafitness972
@darvazafitness972 4 жыл бұрын
but wat if after you do the above and its give you a parameter error
@wtfwtfisaidwtf
@wtfwtfisaidwtf 3 жыл бұрын
Check the spelling of your field name, it should be the same as your field name in access
@neilljansenvanvuuren9025
@neilljansenvanvuuren9025 3 жыл бұрын
Great video, thank you very much. Unfortunately my delpi states dmName is an undeclared identifier but it does recognise dmName_u?
@MrLongITandCAT
@MrLongITandCAT 3 жыл бұрын
Did you give your data module the name. CLick on the Data Module then go to the object inspector and change the name to dmName
@Toturials
@Toturials 6 жыл бұрын
Hi, I have a question, for example I create an application on my Pc, Pc name might be “Dell” this ado connection will add this pc name in connection string. And now if I want to run this application on other computer, I need source code, and again I have to establish ado connection according to new pc name. is it possible that it works for any pc without making any changes? Other way of doing this with code, but then problem is you cannot see any data in design time like you are seen in tables all the column and data.
@paulcross
@paulcross 6 жыл бұрын
THANK YOU.
@anasbr3586
@anasbr3586 3 жыл бұрын
the select * is working, but not with the where ? error ( invalid column name : "name from edit")
@MrLongITandCAT
@MrLongITandCAT 3 жыл бұрын
Can show us the code you used?
@anasbr3586
@anasbr3586 3 жыл бұрын
@@MrLongITandCAT adoquery1.SQL.Add('Select * from client where Numero = "CL001" ');
@anasbr3586
@anasbr3586 3 жыл бұрын
@@MrLongITandCAT adoquery1.SQL.Add('Select * from dbo.client where dbo.client.id = 1'); this one is working, so using integer works fine, but using string is not
@MrLongITandCAT
@MrLongITandCAT 3 жыл бұрын
@@anasbr3586 The one you gave that is working is using dbo client but the one that isn't working has no dbo. Does that make a difference?
@anasbr3586
@anasbr3586 3 жыл бұрын
@@MrLongITandCAT thank you for replying, yes i tried that, the same error message, the same query work fine in sql server, when i use "text" in sql server the same error message appears so i guess that the problem must be the quotation marks!
@rihannasami8990
@rihannasami8990 5 жыл бұрын
thank you
@mehmetyasin3686
@mehmetyasin3686 4 жыл бұрын
which menu?? (select,insert,update,delete)
@robertjuniorinnocentkhuzwa1276
@robertjuniorinnocentkhuzwa1276 2 жыл бұрын
Hey there Mr Long, I hope you're good. Can I please have the datafiles of this project please.
@nikolaosspyrou5660
@nikolaosspyrou5660 4 жыл бұрын
Self Created DataModule?! What happens on larger scale projects? If for instance, you have 50 DataModules?? Will you be filling up memory with objects you might not even need on runtime? And why clearing the TStrings collection of TADOQuery object? var _dmMusic : TdmMusic := TdmMusic.Create(self); var dsQryMusicDataSource : TDataSource := TDataSource.Create(self); dsQryMusicDataSource.DataSet := _dmMusic.qryMusic; with _dmMusic do Begin if qryMusic.Active then qryMusic.Close; qryMusic.SQL.Text := 'Select * from Owners'; yourDBGrid.DataSource := dsQryMusicDataSource; qryMusic.Open; End; That's the code you seek for,, without having self-created DataModules and objects in your entire project with significantly less memory footprint.
@amaara7164
@amaara7164 2 жыл бұрын
Cn you do a video on the pat
@MrLongITandCAT
@MrLongITandCAT 2 жыл бұрын
Hi. We have a whole playlist of PAT TIPS that you can use (see link below). More TIP videos will be added this year. Go look at: kzbin.info/www/bejne/a5zUhoSPnqhoicU
@amaara7164
@amaara7164 2 жыл бұрын
@@MrLongITandCAT okay thanks please can you add for this year
@MrLongITandCAT
@MrLongITandCAT 2 жыл бұрын
@@amaara7164 Definitely. It is on the planned schedule for this year.
@trisanchetty6031
@trisanchetty6031 2 жыл бұрын
What component is the database grid in?
@MrLongITandCAT
@MrLongITandCAT 2 жыл бұрын
It's under Data Controls.
@belgacemdliouah4267
@belgacemdliouah4267 5 жыл бұрын
Merci
@vvs_kade6825
@vvs_kade6825 4 жыл бұрын
im connecting my Query but it is coming up with the error missing sql property
@MrLongITandCAT
@MrLongITandCAT 4 жыл бұрын
You must have some text in the SQL property for the SQL to run when the ado query is active or open. It's like changing a lightbulb. First switch it off, then change it, then switch it on. So for the ado query you first make it active := false ; //should be made false by default then you enter your SQL statement into the ado query's SQL property adoquery.SQL.Text := 'SELECT....' ; Then you "switch the query on" by setting active property to true. If you SQL is correct then the query will run.
@vvs_kade6825
@vvs_kade6825 4 жыл бұрын
Mr Long IT & CAT Thank you sm
@8legs_gaming510
@8legs_gaming510 11 күн бұрын
nice but upgrade you'r mic
@MrLongITandCAT
@MrLongITandCAT 11 күн бұрын
Thanks. We have.
@nicholasjvr250
@nicholasjvr250 5 жыл бұрын
STOUTTTT
@tristanbookhan9956
@tristanbookhan9956 6 жыл бұрын
hello
@paulcross
@paulcross 6 жыл бұрын
Just want to say THANK YOU.
@paranoyakepizot3740
@paranoyakepizot3740 Жыл бұрын
DataBase Firebird SQL ; if ch_AramaOpsiyon.Checked = False then sAra := QuotedStr ( UpperCase ( eAra.Text+'%') ) else sAra := QuotedStr ( UpperCase ( '%'+eAra.Text+'%') ); with dm.qryStokBaslik do begin Close; SQL.Clear; SQL.Add( 'SELECT * FROM T_CARI'); SQL.Add( 'WHERE CARI_ADI LIKE '+ sAra +' ORDER BY ...'); Open; end;
How to do an SQL INSERT in Delphi
14:58
Mr Long Education - IT & CAT
Рет қаралды 36 М.
Databases in Delphi - Connecting to a database using code
19:32
Mr Long Education - IT & CAT
Рет қаралды 26 М.
💩Поу и Поулина ☠️МОЧАТ 😖Хмурых Тварей?!
00:34
Ной Анимация
Рет қаралды 1,5 МЛН
Nastya and balloon challenge
00:23
Nastya
Рет қаралды 55 МЛН
Hacking Websites with SQL Injection - Computerphile
8:59
Computerphile
Рет қаралды 2,4 МЛН
How to do an SQL DELETE in Delphi
14:53
Mr Long Education - IT & CAT
Рет қаралды 11 М.
7 Database Design Mistakes to Avoid (With Solutions)
11:29
Database Star
Рет қаралды 76 М.
you need to learn SQL RIGHT NOW!! (SQL Tutorial for Beginners)
24:25
NetworkChuck
Рет қаралды 1,5 МЛН
SQL Advanced - SELECT queries (part 1)
13:55
Mr Long Education - IT & CAT
Рет қаралды 38 М.
Databases in Delphi - Extracting data from a database table
15:24
Mr Long Education - IT & CAT
Рет қаралды 27 М.