Jump to content
Xtreme .Net Talk

yogiwales

Members
  • Posts

    21
  • Joined

  • Last visited

Everything posted by yogiwales

  1. Hi, How do I go about extracting data from a website? I basically want to connect to a certain page that is updated all the time, and take the information and put it into a database to calculate. The only way I can think of is by saving the file as a html document and parse through it, but its going to be high maintenance, if they decide to change the layout etc.
  2. Thanks Thanks for all your advice, code works good now.
  3. ok, so how do i define a completely global var? and could u give me a coding example (vb if poss?)
  4. There's plenty of info on how to populate datatables with Databases, etc, but I cant seem to find anything on populating via collections How do I set up a dataset Add a datatable then populate the table with a collection say membersCollection The collection is strongly typed. Any help would be good!
  5. collections hello, i'm using vb, and strongly typed collections, that i defined myself so there's no dataset. Thanks.
  6. ok, so what would the code for that look like? could u give me an example?
  7. Hello again! Rite, I have many classes such as orders and customers each assigned with their own primary key to keep the program modular. When I bind a collection to a datagrid it currently shows the Primary Keys (ID) in the boxes and I want them to be replaced by the actual text name for instance: CURRENTLY -------------- Order ID Member ID Invoice Date 1 1 22/4/03 WANTED ----------- Order ID Member Invoice Date 1 Dave 22/4/3 I have a member collection which has dave stored in it as Member ID = 1. Thanks Yogi
  8. I have a combo box that is bound to a list of products. I want the user to start typing in the product they want, and auto complete to narrow the search down. Is this possible with vb.net?
  9. I can pass data to a sibling frame from the parent by creating a public property in the sibling and setting it from the parent. After changing information in the new frame and saving it I want the parent window to update itself to show the information amended. How can i do this? as i cant create an instance of the parent as it already exists, and i cant use that instance as it doesnt exist in the sibling frame. Thanks Yogi
  10. I got it sorted now, i hadnt put the code withing a method, or routine. But once i did that it worked ok! Small things can send u bonkers for hours, and the answer is so simple :-)
  11. OK, this is sending me crazy! I create a class called TransactionCollection, which is a strongly typed collection, and has a sub called add. In another class i create an instance: dim myTransactionClollection as TransactionCollection = new TransactionCollection() I then want to add a Transaction to it: dim aTransaction as Transaction = new Transaction() to add it i would normally go: myTransactionCollection.Add(aTransaction) but when i press the "." the menu doesnt come up, and if i type it manually it states that "Decleration expected". I am lost. Is this a bug?? if so how can i fix it, if not what am i doing wrong?
  12. I dont want to connect over a server, I have xml files stored in the application directory on local computer, and just want to display the data in a datagrid. Just want: ID NAME SURNAME 1 John Davies 2 Tom Jones etc
  13. I got an xml file, how do I create a datagrid and add the data to it? Is it possible to update the data, and add to it aswell?
  14. I have a collection of products held in memory. I want to show the data in a datagrid using a dataset. How do I read the data into a dataset and display it? I can do it with xml, but I cant do it with a collection, HELP!
  15. I am manipulating data from many different collections, and wish to display them to the user in a spreadsheet kind of view, and have come accross the dataset. All the books I have show me how to use these with a remote database. A data set can hold a "spreadsheet" in local memory and I want to use it like that. Just to hold the data, sort and display. How do I go about this, and what are the differences between each of the above? Best Regards Yogiwales
  16. I have looked under there before, and just checked again, there is no Graphics folder under Common7\ I don't understans what you mean by opening the SHELL32.DLL ??? Anymore takers?
  17. Where can I get the default windows buttons bmp files from? My book says it should be installed with the system, I have vb.net and have made a full installation but after searching my system for them they can't be found. Is there a website somewhere where I can download a range of icons?
  18. After hours of searching the web I have worked out how to do it! It's done by serialization. I have created a class called CollectionSerializer which will read/write any object to disk. To write a object pass it to saveCollection() passing in a fileName String and the object to be written. To read the object call loadCollection and pass in the fileName. This will return the object back. Remember to cast the object to its proper type for it to work. Its very sensible to use FileInfo to check that the file exists before calling the loadCollection function. Imports System.IO Imports System.Runtime.Serialization.Formatters.Binary 'This class will allow a collection to read and write information to/from disk '**NOTE All classes used in serialization has to be <Serializabe()> '** When returning a collection it must be casted into the correct type with CTYPE Public Class CollectionSerializer Private serializer As New BinaryFormatter() 'This function will serialize the object that is passed in Public Function saveCollection(ByVal fileName As String, ByVal myCollection As Object) 'Save the new data with the Serializer Dim myFileStream As Stream = File.Create(Application.StartupPath & "\" & fileName & ".txt") serializer.Serialize(myFileStream, myCollection) myFileStream.Close() End Function 'This function will deserialize and return the object Public Function loadCollection(ByVal fileName As String) As Object Dim myObject As New Object() Dim myFileStream As Stream = File.OpenRead(Application.StartupPath & "\" & fileName & ".txt") myObject = serializer.Deserialize(myFileStream) myFileStream.Close() Return myObject End Function End Class
  19. Can someone give me a simple code example on how to write and read a collection to file.
  20. Cheers! Thanks for that! It works like a dream, until the next hurdle...! Yogi
  21. Hi, i'm new to vb.net. I have multiple forms, I open my form up and the values are loaded in through the _Load sub which is great, i then use .hide and .show to display the form again. The problem is that the old values are displayed and not the newest ones. How can i refresh the values, i'm sure i read somewhere that there's a sub where u can put refresh calls in?? i have a sub to refresh the values it just needs to be called when the .show is called. Thanks Yogi
×
×
  • Create New...