|
Thanks for reply,
Actullay iam working on reservation application and listbox contains name of vehicles i want to store all slected vehicles .
you are right kindly write few lines of code how i do that .
loop throuh each items in listbox ? and store one by one
Regards
Rameez
Thnks in advance
|
|
|
|
|
If you are qualified to write the application then surely you can write code to loop through the selected items in a list box.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
I second that.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
rameez Raja wrote: kindly write few lines of code how i do that
No. Leaving it as a learning exercise for you to do.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
|
Thanks for every body's reply
i will do myself after reading such topic again thanks for advise and encouragement.
Regards
Rameez
|
|
|
|
|
I know this is simple for most of you guys but I'm not sure I even have the concept right, so here goes...
1. Read in a txt file that has 1 piece of data per line, I got that...
2. Count the number of items, I got that... :
3. store the count and the items in memory .. I think this is for an array
4. later I use the index to send the item through multiple query's in an SQL database ... got that hard coded right now and it works great
It is step 3 that I am stuck on conceptionally and technically.
Questions
1. Is an array the right thing to be doing here?
Any suggestions, thoughts or instructions would be greatly appreciated.
TIA
meh
|
|
|
|
|
Any reason for getting the number of items and storing it in an array?
For me, I would have skipped step 3. I will read the data per line and write it straight to the database once I read from the text file.
The only catch with this way is that if you encounter any errors in between you will not know the last position of data that you read from the file. But this can be prevented by using DB transaction during your database entry.
Cheers,
DePatrick
|
|
|
|
|
Like the other poster suggested, skip step 3. It is not really needed and is redundant.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I am guessing this is a study assignment, and you were asked to create an app according to these steps.
Under this assumption:
If you have managed step 4 then apparently you are also, perhaps unwittingly, already doing step three.
So the question is: how do you iterate through the items at the moment when running them through the queries?
The purpose of step 3 was probably to enable you to write a loop, for example using an array.
Something like:
<br />
For i As Integer To NumberOfItemsCount -1<br />
RunYourQuery(ForExampleAnArrayWithItems(i))<br />
Next<br />
So once again, as you have managed step 4 already, point 3 is moot, unless your teacher/professor meant for you to iterate though the items with a For loop.
If I assumed wrong about the assignment thing, ignore this and listen to the other guys.
Good luck,
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
Johan thanks for the reply.
I am iterateing through the db query's using the method you described. I have multiple files to read from and was wondering if a memory representation of each of the files would be a better approach?
Thanks again
meh
Statistics are like bikini's...
What the reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|
That is a trickier question.
Theoretically speaking the amount of files could be enormous, and the amount of items in each file could be enormous, (EnormousFileAmount x EnormousItemAmount = HumongousDataQuantity) therefore it would not be advisable to first load all files into memory.
However, the scenario probably is something along the lines of electronic order files, which means that the app would never be handling more than a limited amount of files at any given run.
Connecting many times to a data source (your files) and doing a little work each time is generally speaking slower than making a single connection to a data source and doing a lot of work at once.
However...
Because you are accessing files, you need to make a separate connection to each separate file anyway, so that point is also really moot.
Which brings us to the advantage of many connections and little work each time: data integrity.
I.e. if a connection is interrupted for whatever reason, you loose very little work, and when you are using loops inside loops, there is much less danger of information getting mixed up.
P.S. pointer for extra credit: use System.IO.File.Move("FileLocation/FileName", "ArchiveFileLocation/FileName") , when handling multiple files.
My advice is free, and you may get what you paid for.
|
|
|
|
|
Hi
I want to select various elements of and html document in a WebBrowser control but if web page has button element then I just dont get it selected.
And one more thing, how can I select specific javascript function within a webpage loaded in WebBrowser Control or get complete list of functions.
Can anyone help me please.
Regards,
MAP Tiger
Tiger Softwares
Software Designer and Developer
VB.NET, ASP.NET, VFP
|
|
|
|
|
You can use a hook to capture the clicks. There's code here[^] to disable right-clicks. Just need the hWnd of the webbrowser control.
|
|
|
|
|
i have web site supporting asp.net
i need to connect to db in my site by .net win application
example:
db path : wwwroot\db\main.mdb
Physical db path : E:\Domains\mysite\wwwroot\db\main.mdb
server ip : 00.000.000.000
i write this :
dim con as new oledb.oledbconnection
con.connectionstring = "provider=microsoft.jet.oledb.4.0;data source=\\00.000.000.000\E:\Domains\mysite\wwwroot\db\main.mdb"
but no luck .
Can anyone help?
modified on Sunday, August 3, 2008 4:12 PM
|
|
|
|
|
hi
share the database example dbshare
and set the connection string
"provider=microsoft.jet.oledb.4.0;data source =\\75.126.169.130\dbshare\main.mdb"
|
|
|
|
|
thanks for all first
did you mean Virtual Directories?
|
|
|
|
|
|
yes
'\\00.00.000.000\mydb\db.mdb' is not a valid path.
|
|
|
|
|
Then there isn't anything wrong with your code. You just don't have the correct path to the database.
|
|
|
|
|
hi blackeyes
It seems you dont understand the Basics, but now we cant teach you.You have to find out your self by reading.Check one of the Following Articles on how to connect to a Database. secondly never post your Connection string with your real IP, you dont know who is reading. lastly to Connect to the a Database in .NET you just import the necessary classes , for you case its oldedb and declare a connection string and assign it to what you just showed us and lastly it depends what you want to do with that connection, select ,delete, insert, ? then you have to create command objects for your queries and execute them. see my articles on that
http://www.codeproject.com/KB/vb/N-Tier_Application_VB.aspx[^]
hope it helps
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
I want to Run My Program before Welcome Screen . please help me .
my program is a winapp .
en mahdi .
|
|
|
|
|
You need to make the program as a Windows service.
|
|
|
|
|
Hi
Is there any possibility that I can get the mouse position while it is moving at WebBrowser control?
Please help me asap.
Regards,
MAP Tiger
Tiger Softwares
Software Designer and Developer
VB.NET, ASP.NET, VFP
|
|
|
|
|