|
The core question is, how will you store the information ? I'd lean towards an XML file, which means you need to go to the w3c site to read their tutorials on XPath, so you know how to search your XML to get the values out. A database is probably easier to search, but more work to set up. SQL Server Express is free, if you wanted to try that instead.
If you set up XML like
<airplanes>
<plane>
<name>Messerschmidt
<year>1942
<origin>German
<passengers>2
( or whatever data you want, obviously )
then you can load it into an XmlDocument with the Load method, and do a foreach on document.SelectNodes("/airplanes/plane") which will give you a node for each group, then you can do node.SelectSingleNode("name") for the node with the name, etc.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I have finally found a good VB.NET book, purchased it today and am already through the first 4 chapters....Deitels How to program in Visual Basic.NET. Its the first one Ive found that actually DOES talk about HOW to program in VB.NET and doesnt spend 75% of the book on form design!
Ordered the Inside C# book you mentioned, by the time it arrives I should have more of an idea of whats going on!
Cheers
|
|
|
|
|
idyot wrote: Where Im stuck now (hesitating to ask cos its 101 stuff again) is converting a string to a value so it can be used for calculations. Looked in books , looked in F1 and have this working but I doubt its the right way
Well, we're not laughing at you. We all had to learn the languages somehow. The trick to learning the language isn't trying to write an application while you don't know the language. You're trying to put together a puzzle without knowing what the pieces look like.
Turn this around and learn what the puzzle pieces look like first. How I did it was to look at some functions in the references and write tiny apps to see how they worked. Stepping through them with the debugger and examining the values. Changing tiny pieces here and there to see what effect they had. Learn what the basic data types are and what the functions and method are looking for in their parameters and what types they return.
I can pickup and learn any language I want in a very short time because I completely understand all the basic types and how OOP works.
|
|
|
|
|
idyot wrote: I dont wanna clog the forum up with uneducated stupid questions...
I don't think you are clogging up the forums with your questions. You are learning and this isn't a bad place to ask for help.
idyot wrote: know of any decent books
Not sure if one exists. You may want to look at Apress VB.Net books[^]. I've picked a few of their books in the past, primarily SQL 2005 books, and they seem pretty alright
A few decent books, codeproject, and google, you'll be set
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
This may be a dumb question but are you doing this as a WinForms project or is it a web app? If a web app, check that you've set the drop down list to trigger an AutoPostBack (I think it's called that or something similar on the properties sheet).
Just the fact that you've called it a combo box and not a drop down list leans me to believe this is a WinForms thing but I'm just trying to eliminate the impossible.
|
|
|
|
|
Hi friends
Please help me out with my problem. I am uploading an html file after every 10 seconds to my website with the help of VB.net 2002 and framework 1.0. I have used exception handling in each and every part where ever it was needed. Now when I execute, the application stops responding after say 10 minutes (not fixed sometimes it functions properly for an hour or more), without giving any exception. I am stuck with the problem - don't know the problem occurs because of the Internet speed or there is some problem with my VB.net code. Hoping for an early positive response. Thanks
Nakul
|
|
|
|
|
There's very little we can tell you about what may be wrong because we don't know the circumstances under which the code is running, nor do we know anything about your code. How big is/are the file(s)? How long do they take to transfer (average)? Is this is local web server you're uploading to, or remote? ...
Personaly, I think FTP'ing a file every 10 seconds is a bit much to ask. ANY lag in that process stands the risk of having the code rerun and try to upload another file while the previous one is still being transferred. Of course, that depends on how you're code is written.
Does your code properly logout of the FTP server when it's done uploading the file(s)? If not, how long does the FTP server wait before it times out the session and destroys it?
|
|
|
|
|
Respected Sir
Thanks for you concern. The file size is around 3 KB only. It just takes less than a second for the transfer to the reomote server. Upload speed at my place is around 8-10 KBytes/sec
What I am doing is in each cycle, I first logs on to the remote server (logs on to my website), then I transfer the file and after that I dosconnects.
It always logs onto the server successfully, but sometimes it fails during the tansfer, so what I think is it always stuck up during the file transfer phase.
(phase1: Logging onto the server, phase2: File Transfer, phase3: Disconnects)
Please can you help a bit more regarding this, I shall be greatfull to you.
Regards
Nakul
|
|
|
|
|
Are you reusing the same Ftp client or are you creating a new one for each upload?
This can also be an issue with the FTP server. Try knocking the timing back to every 30 seconds and see what happens.
|
|
|
|
|
Sir I have tried this with 1 minute also, but the problem remains the same
Error shown by the application: An existing connection was forcibly closed by the remote host at 6/4/2007 7:58:39 PM
-- modified at 11:25 Monday 4th June, 2007
Nakul
|
|
|
|
|
I would see about possibly changing the FTP Server out to see what happens.
Is the FTP Server running on Windows XP or is it on a true Server edition of Windows, or something else? What's the maximum number of sessions that the server will accept? Whats the timeout for the FTP sessions?
|
|
|
|
|
Dear Sir
I have created 2 forms on VB .NET.
Form1 has a Panel1 with 25 Buttons inside this panel.
Form2 has a Panel2 which is an emty panel.
My question is that:
If i click on any of these buttons one-by-one (Panel1 with 25 buttons), I want this buttons to be added one-by-one into Panel2 and hold their sort of reference of click_event.
Im a student and very new to VB .NET
If someone can help it would be very grateful to me...
Kind regards
Roni
|
|
|
|
|
You'd have to either move the button like I show'd you before, you you would have to dynamically create an entirely new button and place it on Panel2. A control cannot be a member of two different controls collections at the same time. In other words, a control cannot show up in two different places at the same time.
|
|
|
|
|
Hello my good frnds,
can any one tell me, how can i programatically ENABLE the macro in word 2003, IS IT POSSIBLE ?????
if yes..then please tell me how can i ??? any code ???
i am using vb.net 2.0
Thankx in advance,
koolprasad2003
Be A Good S/W Eng... Life is swing with you..Enjoy..
|
|
|
|
|
You can't. In order to enable the macro code to run, the macros would already have to be enabled!
|
|
|
|
|
Hi experts!
my query is.. can we create a dynamic conncation string at run time... no matter to which database we r connecting to.. it may be SQL server, Oracle, MYSQl, ACCESS... etc.
when ever i execute my appplication... the user shud be able to choose from the available drivers.... to which database they want to make connection ... like a wizard. i am using VB 6.0.
Or is it possible that ... the wizard which Microsoft provides for connection string...cud be called directly into the application.. from which connection shud be made automatically depending upon which database does the user has selected... is there any aPI to handle this!!! the reason.. i m askin this.. is to avoid the massive chunk of code to be written! which is surely gonna hang me up in the office for next couple of weeks!
Any suggestions please...!!
thanx in advance..!
|
|
|
|
|
A connection string is nothing but a normal string of text. You need to have template strings for all the database engines you're going to support. You can find examples at http://www.connectionstrings.com[^].
After that, you'd have to write a data layer for each database engine you're supporting too. Access doesn't support the same SQL syntax that SQL Server does and Orcale has it's own flavor too. Each version of this data layer would implement an Interface that you write to provide all the functions you need.
To support all this, you wouldnt be saving yourself frmo writing a "massive chunk" of code, you'd be guaranteeing it.
|
|
|
|
|
hello there good programmers... a little help here about vb code that can display a message while in 3d environment. any idea?
to explain further. am now coding a server/client program. and my problem is when i send a message to the client program the user cant see it while in 3d environment. how do i solve this problem? is there any other solution?
thank you very much...
jigs
-- modified at 7:01 Saturday 2nd June, 2007
|
|
|
|
|
How are you sending this message ? If a 3D game is running, I'm not sure what you can hope to do, Windows will not be processing any drawing messages.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
the server program sending a message in the client in normal way. recving a string then displaying it using normal window.
the problem is, its not displaying the message in the time its arrive but instead its in the back or behind of the 3d program when the user in the workstation which have a client program is in 3d environment. the scenario should like this
server
|
|
workstation (client running in 3d environment e.g. 3d games)
>> actually the workstation with client program receiving the message and displaying it but its in the back of the 3d program. i want to make a vb program that can display message wether its in 3d program or in normal mode. its possible?
|
|
|
|
|
If it is, it would involve detecting that DirectX was being used, finding the directX surface in use and rendering to it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
nice idea thnx, but is it possible to display a message in windowless environment? if the client program detected dx8, is it possible to dislay message in the top of the 3d program? do i need a hooking technique or it is just simple detection and display in 3d way..?
>>> ok i'll make a experiment if its possible
-- modified at 8:28 Saturday 2nd June, 2007
|
|
|
|
|
i have no idea how to detect if directX is loaded or not... o boy having troubled with this program.
-- modified at 9:40 Saturday 2nd June, 2007
|
|
|
|
|
Serialization is the process of writing the data in a class, i.e. the values of its properties - into a string that can be written to disk, or sent to an object in a client program. It's approximately the equivalent of putting data into a DBF. So what's the big deal?
|
|
|
|
|
You may want to read up on Serialization[^]. You've generalized it way too much.
Serialization converts an objects data into a trasmittable or saveable form, be it binary or text based.
|
|
|
|