Search results for query: *

  1. V

    SelectedValue coming up blank in listbox

    Nevermind. I needed SelectedItem instead.
  2. V

    SelectedValue coming up blank in listbox

    ...'Declare a command and assign a SQL string to it Dim sqlcomm As SqlCommand = sqlconn.CreateCommand() sqlcomm.CommandText = "SELECT * FROM Students" 'Declare a datareader Dim drd1 As SqlDataReader = sqlcomm.ExecuteReader() While drd1.Read()...
  3. V

    Serialization Problem

    Great! Finally getting somewhere. Last question, I've got everything working but my listboxes. The boxes themselves are reappearing after deserializing, but not their contents. How do I get the contents?
  4. V

    Serialization Problem

    I'm sure this is elementary stuff, but I can't figure out how to get info to pass from a form to a class library. How is this done?
  5. V

    Serialization Problem

    This is my first time trying to serialize something. I'm getting an error that says: Type 'System.Windows.Forms.Form' in Assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as serializable. The class is marked serializable, so I'm...
  6. V

    Creating listboxes "on the fly"

    Ok, new question on this topic. I'm trying to add data to these listboxes now. Each listbox was named "lstPL" & intPlayers in a loop. I can't figure out how to reference these listboxes in a loop later on. What I have below in red doesn't work. While intDealCard <= 51...
  7. V

    Creating listboxes "on the fly"

    Nevermind, I got it.
  8. V

    Creating listboxes "on the fly"

    When I want to add something to these boxes later, how do I know what its name property is? Can they be named as they are created? lst1, lst2 etc...
  9. V

    Creating listboxes "on the fly"

    Let's say I ask the user for a number between 1 and 10, then they click a button. How would I then create that same number of listboxes to appear on a form? I know I could create them and make them visible after the number is entered, but I'm pretty sure that will create a ton of unnecessary...
  10. V

    Looping Problem

    ...Dim decRunningTotal As Decimal For intCounter = 0 To objDT.Rows.Count - 1 objDR = objDT.Rows(intCounter) decRunningTotal += (objDR("Cost") * objDR("Quantity")) MsgBox("cost " & objDR("cost") & "Qty " & objDR("Quantity")) Next Return decRunningTotal End Function
  11. V

    Trouble sizing datagrid column

    I'm trying to resize some columns on a datagrid, but keep getting an error. Here's the code I'm trying to use... dim dgColumnStyle as DataGridColumnStyle dgColumnStyle = dgBooks.TableStyles(0).GridColumnStyles("Title") 'Error on this line dgColumnStyle.Width = 200 I get an...
  12. V

    Connecting to a database

    ...Integrated Security = True") Dim cn As New Odbc.OdbcConnection("dsn=pubs;uid=sa;pwd=admin;database=pubs") Dim sqlcomm As New SqlCommand("select * from Authors", sqlconn) Private Sub SQLPractice_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub...
  13. V

    Looping Problem

    I am attaching a school project I am working on. The problem I'm having is when I add an item to the cart, it always doubles the quantity. I have figured out that the problem is that the program is looping, causing it to do several steps twice. I cannot figure out why it is looping. Obviously...
  14. V

    Array Problem With Datatable?

    ...set to an instance of an object." The error points to the line of code with the array. For intCounter = 0 To objDT.Rows.Count - 1 objDR = objDT.Rows(intCounter) decLineCost = (objDR("Cost") * objDR("Quantity")) decRunningTotal += decLineCost strLineCost(intCounter) = decLineCost.ToString Next
  15. V

    Help needs tips for newbie vb .net programmers..

    I'm no expert, but I know they'll want a lot more details about what kind of program you want to write. "Neat" is a subjective term.
  16. V

    Putting data in a database VB2005

    I have a webform that contains a shopping cart. A datagrid is created on the fly as the user selects items. Once the user clicks a "complete" button, the items they selected should be dumped into a Access database. I've had projects that pulled data into a table from a database, but never...
  17. V

    DataGrid Update problem

    I have a webpage I made that contains a datagrid. I added the Edit & Delete buttons automatically through the properties of the datagrid. Anytime I make a data change and click the automatically updated "update" link, I get the following error: Updating is not supported by data source...
  18. V

    Changed from VB 2003 to 2005?

    It did work in a program I wrote last year in VB2003. I have a text file with two fields per line. I'm trying to make it so the comma doesn't print out in the text box. So, the purpose in this declaration is to have it know that the comma is the delimiter. In my VB2003 code I had...
  19. V

    Changed from VB 2003 to 2005?

    This line gives me an error on the ToChar in VB2005, saying ToChar is not declared: Dim chrDelimiter() As Char = {ToChar(",")}
  20. V

    Having ASP.Net find a .txt file

    Thank you, sir!
Back
Top