Hi, Direct name search without typing %. Button1_Click Time on Video 5:15 Copy and paste the below code or check the code; I have added 2 % symbols after like. PersonDataGridView.DataSource = Me.TestDBDataSet .Person.Select("personname like '%" & TextBox1.Text & "%'") Once done, run and check, you will be able to search names without percentage symbol. I'm not a programmer but luckily it worked for me. Thought it might help others.
@deathpedal Hi there... You could create a query adapter that execute the following sql "delete from mytable" replacing mytable with your table name. Since there is no where part then the sql will remove all records in that table. If you want to clear the whole DB then you need to execute this kind of SQL on every table, and also you need to take into consideration the Foreign key constraints while doing that.
The simplest way must be to change the code for the button. Just automatically set a % after and/or before the text. That might solve your question. But if you want to search for matching results without "%" just do like Paul said: .Select("ColumnName LIKE '%" + TxtLike.Text + "%'")
Mkaatr you ARE THE MAN followed your instruction and added row count and it worked Dim dt As attendanceDataSetTableAdapters.DataTable1TableAdapter dt = New attendanceDataSetTableAdapters.DataTable1TableAdapter() dt.Fill(AttendanceDataSet.DataTable1) , Dim rCf() As attendanceDataSet.DataTable1Row rCf = AttendanceDataSet.DataTable1.Select("username = '" & txtUser.Text & "' AND `date`= '" & Now.Date & "'") If rCf.Count > 0 Then MsgBox("Stop") Else
You need to have a "If" first of all. After that you need a "Then". In the end you'll need "End If". In the middle you can use "Else" or "Elseif". If it doesn't work make sure it is "Connected" to the right If.
@pinmedownbaby Hi there... Sorry about that... hopefully, the next set of tutorials have better audio quality. Thanks for the feed back , and happy new year :)
I haven't worked in VB6 for a very long time. So I am afraid I can't be of much help. However you could create a SQL statement that filters data based on a specific parameters. This should work in VB6.
hi mkaatr i watched your video it help me alot...but could you tell me if i have to different table i want to show only 2 columns from on table and other column from othe would i be able to displayed in 1 datagrid.. thanks evry one
@Kyuoera Hi there... To perform printing of values that you read from the db, usually you need to use some kind of reporting solutions. You could write your own code to work with the printer, but it requires some work. The issue is not the database here. It is how you format your output to the printer. I will try to record a video tutorial about how to work with a printer when I get some free time. yours
thank you for your video , and if i want to use a combobox instead of textbox and want that items will be PersonID, StateID, PersonName and not their values , what must i do?
Thanks for the video, really helpful, but I have a problem, everything works fine when I use the search button but when I'm done searching, my data grid appears blank. Could you help me?
@loveemaw Hi there... Sorry for the late response, I was not very well last week. Could you give me more detail about the problem here? Are you getting a single row as a result? are you trying to cancel the search? Could you explain more? yours
@sudani1969 Hi there... You have most of your work done already. All you need to do is create a table adapter, the will join the two tables, and create a new Fill method that uses parameters - username and password for example. Next you run the query, and get the result, and you could just check the field in the item array: if (MyTable.Rows(0).ItemArray(3)=Now.Date) then the line above illustrates the idea i did not check its syntax. If you still have problem with this let me know. yours
@notta3d Check out the DB tutorials at the website, and see how query adapters can help you perform Update,Insert and Delete. It is the sixth tutorial. Also, the video of the sixth db tutorial is available on the channel. yours.
@sudani1969 Try this: Dim DS As New AttendanceDataSet Dim DA As New AttendanceDataSetTableAdapters.t2TableAdapter DA.FillByMyFilterMethod(DS.t2,MyFilterValue) This won't work of course because I don't know the names and lots of other stuff, but focus on the idea here. The DS represents all the tables, you need to specify which table should be filled by the adapter. If you still having the issue, send me the DB design, and I will make a video about it. yours
Hello sir, thanks to you for excellent tutorial. Could you please help to search between two parameters. for example: there are five different dates in a date column. i would like to search dates between one to three and it shows on Data grid. Please please please please help me.
That is great tutorial.but i need to ask one thing.I want to search a specific items from the table.how can i search any data by some characters.for example,names starting f,fi,fiss,fisse,fissseh,fisseha. and so on.thanks a lot for your cooperation in advance!
@sudani1969 Hi there... You could hide the columns you don't want to show simply, click on the datagridview, select edit columns, select the column you want to hide or delete , set its visible to false, or delete it all togather. as for displaying information from two tables in the same data grid, you have to create a new table adapter, then use a query to join both tables, and link a datagridview to that query. hope this help. yours
hi Mkaatr still not working for me thanks by the way i'm doing very well following ur tutorial here is my data set name 'AttendanceDataSet1' has 3 tables i wanted to filter 't2' i manged the sql query but i'm failing where to set the dataset and creating tableAdapter i manged it using VS2010 schema bulider i know how to to do it in code when i set dim ds as new data set dim da as mysqldataadapter but this way i failed misreabley any advice
I don't understand how making a simple app/frontend that is just a search isn't included as a point and click sort of thing yet. It's probably been around since the DOS database days, but we still have to try to mess with all of this stuff. So many videos, but none of them help me with my own database since I want to be able to search from any of my textboxes/all of my textboxes/combo of my textboxes/only one of my textboxes with one search button to filter the results. Can anyone help? Trying to make my own database of my thousands of photographs as a little project. It's easy to enter the records in Access, but no idea, even after spending two straight days watching video after video on this. It's all either way too complicated of a search, or way too simple.
Hi. 1st, thank u for the video... When i click the search button it doesn't show me all columns. Plus some times it an exception error appears, Why is that happening??
hello sir,Nice video i am using same format but i have one dateAndtime column datatype datetime ,,,i want to search record between range of time can you please help me that how can i search record using its time...
Thank you I guess for her to use like '%" etc...... for example I search in to fields "Ar" and Eng" Private Sub TextBox1_KeyUp(sender As Object, e As KeyEventArgs) Handles TextBox1.KeyUp Me.DicDataGridView.DataSource = Me.CoDataSet.Dic.Select("Ar like '%" + TextBox1.Text + "%' or eng like '%" + TextBox1.Text & "%'") End Sub I hope this helpful
Man, this was EXACTLY what I needed! Thanks for taking the time to put these videos together! Keep up the great work!
Hi,
Direct name search without typing %.
Button1_Click
Time on Video 5:15
Copy and paste the below code or check the code; I have added 2 % symbols after like.
PersonDataGridView.DataSource = Me.TestDBDataSet .Person.Select("personname like '%" & TextBox1.Text & "%'")
Once done, run and check, you will be able to search names without percentage symbol.
I'm not a programmer but luckily it worked for me. Thought it might help others.
@deathpedal
Hi there...
You could create a query adapter that execute the following sql "delete from mytable" replacing mytable with your table name. Since there is no where part then the sql will remove all records in that table. If you want to clear the whole DB then you need to execute this kind of SQL on every table, and also you need to take into consideration the Foreign key constraints while doing that.
The simplest way must be to change the code for the button. Just automatically set a % after and/or before the text. That might solve your question. But if you want to search for matching results without "%" just do like Paul said: .Select("ColumnName LIKE '%" + TxtLike.Text + "%'")
Thanks for the video. Looking forward to the UPDATE, INSERT and DELETE videos.
Mkaatr you ARE THE MAN followed your instruction and added row count and it worked Dim dt As attendanceDataSetTableAdapters.DataTable1TableAdapter
dt = New attendanceDataSetTableAdapters.DataTable1TableAdapter()
dt.Fill(AttendanceDataSet.DataTable1) ,
Dim rCf() As attendanceDataSet.DataTable1Row
rCf = AttendanceDataSet.DataTable1.Select("username = '" & txtUser.Text & "' AND `date`= '" & Now.Date & "'")
If rCf.Count > 0 Then
MsgBox("Stop")
Else
You need to have a "If" first of all. After that you need a "Then". In the end you'll need "End If". In the middle you can use "Else" or "Elseif". If it doesn't work make sure it is "Connected" to the right If.
Excellent tutorials....thank you :)
@pinmedownbaby
Hi there...
Sorry about that... hopefully, the next set of tutorials have better audio quality.
Thanks for the feed back , and happy new year :)
this is great man! i'm really grateful
I haven't worked in VB6 for a very long time. So I am afraid I can't be of much help. However you could create a SQL statement that filters data based on a specific parameters. This should work in VB6.
@deathpedal
Check 8:03 , you just change the search column to PersonID
@landy1727
Hi there...
could you give more details on how did you make the search?
hi mkaatr
i watched your video it help me alot...but could you tell me if i have to different table i want to show only 2 columns from on table and other column from othe would i be able to displayed in 1 datagrid.. thanks evry one
@Kyuoera
Hi there...
To perform printing of values that you read from the db, usually you need to use some kind of reporting solutions. You could write your own code to work with the printer, but it requires some work. The issue is not the database here. It is how you format your output to the printer.
I will try to record a video tutorial about how to work with a printer when I get some free time.
yours
@Kyuoera
Hi there...
what do you mean by "print the database"? could you clarify please?
yours
Great job. this was really helpful thanks a ton
thank you for your video , and if i want to use a combobox instead of textbox and want that items will be PersonID, StateID, PersonName and not their values , what must i do?
Thanks for the video, really helpful, but I have a problem, everything works fine when I use the search button but when I'm done searching, my data grid appears blank. Could you help me?
@loveemaw
Hi there...
Sorry for the late response, I was not very well last week. Could you give me more detail about the problem here?
Are you getting a single row as a result? are you trying to cancel the search? Could you explain more?
yours
@sudani1969
Hi there...
You have most of your work done already. All you need to do is create a table adapter, the will join the two tables, and create a new Fill method that uses parameters - username and password for example.
Next you run the query, and get the result, and you could just check the field in the item array:
if (MyTable.Rows(0).ItemArray(3)=Now.Date) then
the line above illustrates the idea i did not check its syntax. If you still have problem with this let me know.
yours
@notta3d
Check out the DB tutorials at the website, and see how query adapters can help you perform Update,Insert and Delete. It is the sixth tutorial. Also, the video of the sixth db tutorial is available on the channel.
yours.
@sudani1969
Try this:
Dim DS As New AttendanceDataSet
Dim DA As New AttendanceDataSetTableAdapters.t2TableAdapter
DA.FillByMyFilterMethod(DS.t2,MyFilterValue)
This won't work of course because I don't know the names and lots of other stuff, but focus on the idea here.
The DS represents all the tables, you need to specify which table should be filled by the adapter.
If you still having the issue, send me the DB design, and I will make a video about it.
yours
can we do this during text change event? i mean is it the same thing?
hi!
is there anyway to search without the %. if i want to search names starting with A, can i search A instead of A%??
Thanks!
helo great work been looking for this lines of code..
@loveemaw
I should be the one thanking you since I did not know about Filter.
:)
Could you do this on C#, please?
Hello sir, thanks to you for excellent tutorial.
Could you please help to search between two parameters.
for example: there are five different dates in a date column. i would like to search dates between one to three and it shows on Data grid. Please please please please help me.
hi could you please show how to add picture in your database which can be visible in data grid view during the search??
That is great tutorial.but i need to ask one thing.I want to search a specific items from the table.how can i search any data by some characters.for example,names starting f,fi,fiss,fisse,fissseh,fisseha. and so on.thanks a lot for your cooperation in advance!
@sudani1969
Hi there...
You could hide the columns you don't want to show simply, click on the datagridview, select edit columns, select the column you want to hide or delete , set its visible to false, or delete it all togather.
as for displaying information from two tables in the same data grid, you have to create a new table adapter, then use a query to join both tables, and link a datagridview to that query.
hope this help.
yours
@deathpedal I need it too, if you find the answer, please tell me
Thank you
How can I search for the items in database table without using the % at the end?
hi Mkaatr
still not working for me thanks by the way i'm doing very well following ur tutorial
here is my data set name 'AttendanceDataSet1' has 3 tables i wanted to filter 't2' i manged the sql query but i'm failing where to set the dataset and creating tableAdapter i manged it using VS2010 schema bulider i know how to to do it in code when i set dim ds as new data set dim da as mysqldataadapter but this way i failed misreabley
any advice
I don't understand how making a simple app/frontend that is just a search isn't included as a point and click sort of thing yet. It's probably been around since the DOS database days, but we still have to try to mess with all of this stuff. So many videos, but none of them help me with my own database since I want to be able to search from any of my textboxes/all of my textboxes/combo of my textboxes/only one of my textboxes with one search button to filter the results. Can anyone help? Trying to make my own database of my thousands of photographs as a little project. It's easy to enter the records in Access, but no idea, even after spending two straight days watching video after video on this. It's all either way too complicated of a search, or way too simple.
I salute... Thanks a lot :)
Can i have a code if i want to search the whole datagrid?pls?
I got "you cannot add or change a record because a related record is required in table" this error. Can you solve this one.
Hello sir, how to perform search in UNION query?
@banglaparade
Hi there...
could you send me the code, or an image?
Hi. 1st, thank u for the video...
When i click the search button it doesn't show me all columns. Plus some times it an exception error appears, Why is that happening??
Could you post the error message?
how can I contact you in private ? I really need your help if you dont mind
Can't promise I will reply, but the email is: notes@mkasoft.com
I want to learn to do that but in vb6
dude the gud tutorial
how to search the id?
hello sir,Nice video i am using same format but i have one dateAndtime column datatype datetime ,,,i want to search record between range of time can you please help me that how can i search record using its time...
@sudani1969
Glad that it worked for you.
yours
Mine wont reconnize the use of "Then" and "elseIf" when im making the radio button... does anybody have a clue or another way to do it?!
Thank you
I guess for her to use
like '%" etc......
for example I search in to fields "Ar" and Eng"
Private Sub TextBox1_KeyUp(sender As Object, e As KeyEventArgs) Handles TextBox1.KeyUp
Me.DicDataGridView.DataSource = Me.CoDataSet.Dic.Select("Ar like '%" + TextBox1.Text + "%' or eng like '%" + TextBox1.Text & "%'")
End Sub
I hope this helpful
thank you very much srsly thank you:)
HI SIR CAN YOU POST A VIDEO ON HOW TO "DELETE ALL RECORDS" IN DATABASE? TY SIR... .
how to search ID???????????????
Put in your database this code
Me.datafilenametableadapter (me._filenamedataset.datafilename)
Shhhhhhhhhhhhhh..
Man i cant understand any word you saying can you atleast make a subtitle of this? I mean it's a good lesson but bad sound quality. Sorry
I agree with you. I fixed the sound problem in later tutorials.
the faking view is always moving i cant concentrate on watching
Sorry about that. In receipt videos I changed the recording software so the view is in full screen, which makes thing easier.