Thanks Jebeson,
I have to loop starting from the first row to the last row, because i need the rows to be in order, based on time. if i start from the bottom like you suggested, it wouldn't help what i am trying to accomplish.
Is there another way i can start from the first row to the last row...
Hello,
I tried to remove a row from a dataset while looping through the dataset, but it seems other rows are not moving up. I am getting an error message "IndexOutofRange Exception was unhandeled, There is no row at position 21." and i have 30 rows in the dataset.
Here is the code and what i...
The actual value for the varaible is numerical.
I tried your code and it works. Thank you so much.
What if the variable is a text, what will change?
Thanks.
Yes i do. if i put an actual employeeID ( for example 12568)
i know exist, in the vlookup formula instead of "EmployeeID" it works. it just doesnt work for the varaiable.
Thanks.
I am getting the same error with my code and yours, the error is:
" COMException was unhandled
VLookup method of WorksheetFunction class failed"
Thanks.
Thanks Andy, the "name" was just an example, not what is in my actual code.
Another question what if the EmployeeID is from a dataset. for example:
Dim EmployeeID
Dim LstName
xlApp = New Excel.Application
xlWorkBook = xlApp.Workbooks.Open("C:\LookupTable")
xlWorkSheet =...
Hello,
I am trying to vlookup employees name in a excel file from vb.net, using a variable in the vlookup formula and store the name is another variable. I have tried the below code but it does not seem to work because of the variable in the vlookup formula.
xlApp = New Excel.Application...
The data types in the source database is "text" and i am trying to convert it to a date format, from sql query.
For example the Column names are StartDate and StartTime has:
StartDate StartTime
20111025 0025
My query in VB is:
Dim sql as Date
sql = "SELECT (Mid([StartDate],5,2) & " / "...
Thanks Davejam,
The query still, does'nt work.
Thanks Andrzejek,
That is not the exact names of the fields in the database, i just used that as an example. I have tried different select query but still no success!
Im sorry, but the query did not work.
I tried to create a new column by adding the the original date and time and seperating them to the Date format, but it did not work.
My Query was:
Select Date, Time, (mid([Date],5,2) & "/" & Mid([Date],7,2) & "/" & Left([Date],4)) & " " & (Left([Time],2)...
Hello, i am new to programming and VB.net any help will be appreciated.
I have a SQL database that i do not have a "write-access" to, the database has 2 columns that looks like this:
Date Time
20111025 0025
How do i create a new Column with VB, that will look like this...
Thanks for the post Feherke, not quite what i want...
What i want is to be able to output each line by itself.
For example if i want line 3, i want this "text2a text2b text2c" to be outputted and if i want line 9, i want this "text8a text8b text8c text8d text8e" to be outputted.
Thanks
Yes, that is only an example and the content of the list can be any text... It is just a list and im trying to output each line by it self.... Is it possible?
Thanks for your help
Thanks i was able to use foreach
[code]
set outfile [open "july07.txt" w]
set query "select name, Access, description, number, units, syntax from testingresults
WHERE LIKE 'testing%' AND Access='read-write'"
set foo [sql $query]
foreach result $foo {
puts $outfile $result
}
[/code
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.