|
i am using VB.net for the first time on a data project. I have used the built in functions to put data in a DataGrid. Now what I need to know how to do is when user types in a text box use that to narrow results.
Any examples or help is appreciated.
|
|
|
|
|
|
Hello guys
help with following
having a folder ,containing many subfolders with the following names
folder 1 :2007-1-30
Folder 2 :2007-2-1
folder .....
how can write a function to let the user : specifies which subfolders to delete
i mean :if the user wants to delete everything with the name before:2007-2-20
algorithm: after choosing a date from the calendar ,delete all the subfolders where their name are inferior from the chosen date
what about the following code.what should i add to it
Dim mydate As String, mymonth As String, myyear As String<br />
mydate = Me.DateTimePicker1.Value.Day.ToString<br />
mymonth = Me.DateTimePicker1.Value.Month.ToString()<br />
myyear = Me.DateTimePicker1.Value.Year.ToString<br />
Dim dir_info As New DirectoryInfo(Path)<br />
dir_info.Delete(True)
Regards,
Regards
Ramy
|
|
|
|
|
Hi,
I have to select the value in datagrid and get that selected value in textboxes and update and delete the values from the textboxes.Please tell me how can i do this in vb.net 2003.
|
|
|
|
|
How do you mean 'select the value'. You want to search for a value ?
You want to update and delete what ? The grid, or the data source ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
hi i would appreciate it if you could show me how to search for a value within the datagrid as i am really stuck on my final year project.
thanx in advance
|
|
|
|
|
http://www.codeproject.com/cs/database/gridex.asp[^] looks helpful. You could either use the control, or look through the code to see how it works.
Depending on your datasource, you may be able to run SQL on the source, or you can iterate over the Rows collection to find the values you need.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
hi thanx for the link...i had a look it seems to be done in C. I have done it in vb code. i used the wizard to create the forms. Using a untyped dataset i think. all the search code ive found is for typed datasets i think...
Me.objdsDiary.Clear()
Me.OleDbDataAdapter1.SelectCommand.CommandText = "Select * from 0830 where AppointmentDate like '%" & Trim(Me.lbl2.Text) & "%'"
Me.OleDbDataAdapter1.Fill(Me.objdsDiary)
or
Adodc1.RecordSource = "Select * from secretary where club = """ & txtSearch.Text & """"
Adodc1.Refresh
or
Private Sub Command1_Click()
With Adodc1
.Recordset.Find "Au_Id=" & CInt(txtAuthorId.Text)
End With
End Sub
which do not work as i dont have adodc, all i have is CottageBookingSystemDataSet, TblEmployeeBindingSource, TblEmployeeTableAdapter, TblEmployeeBindingNavigator.
Ive been looking on so many forums.
|
|
|
|
|
i have found the code to search using a string,
TblCustomerBindingSource.Filter = "txtFirstName LIKE '%" & TextBox1.Text & "%'"
how to i implement it to search a int eg the primary key for customerid?
|
|
|
|
|
I have used Testfile connection with my application, but i don't know how to use sql statement.
Thanks
................
|
|
|
|
|
You don't know how SQL works ? It's pretty simple, and there are tons of examples on the web. At it's most basic level, select * from [tablename] will return all the data in a table, and select 8 from [tablename] where [column] = [value] ( with single quotes around strings ) will select a particular value.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
What is [tablename] i don't understand wheter i used text file.?
................
|
|
|
|
|
OK, you're connecting to a text file ? What does that have to do with SQL ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I don't know how to use SQL statment and fill data to dataset
Thanks
................
|
|
|
|
|
From a textfile ? Is that even possible ? Your textfile doesn't have any named columns, if some sort of reading of textfiles is possible, I doubt it's using SQL.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
hello
how can i delete subfolders within a folder
----
Regards
Ramy
|
|
|
|
|
The same way you delete a folder, one at a time. YOu need to iterate over sub files and folders before you can delete a folder.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
|
test to my mail
Regards
Ramy
|
|
|
|
|
How can i Unzip the zip files using vb.net code...
Feroze
|
|
|
|
|
I think VB2005 has a zip library, any other version, you need an external library
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
|
if u have installed winzip on ur machine and if it allows u zip/unzip at command prompt then u can do it easily....
1) create a process by specifing executable path of winzip.exe...
2) specify other parameters i.e. files to zip/unzip with required switches...
3) run this process...
Thanks & Regards...
Amit
|
|
|
|
|
Hello everybody!
This may sound like a really stupid question, but let me tell you that i'm new to .Net, so please be patient with me!
I need to find out what is the equivalent of the .additem function from VB in .Net.
Thank you sooo much!
|
|
|
|
|
That depends, what does it do ? Is it a method on a control ? If so, the controls have Items collections, so it becomes Items.Add.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|