Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. needhelpso

    Can anyone Debug a sql statement

    This statement is not working and I think it is due to syntax....I think I am missing a " or something... strUpdateStatement = "UPDATE Employee_Info SET PayPeriod='" & dropdownlist2.selecteditem.value & "', Hours='" & HourlyRate.Text & "' WHERE Employee_ID=12...
  2. needhelpso

    Help with storing numbers in an array

    Hi all again, Here is the code that works: Dim elements() As String = New String() {"1", "2", "3"} Dim i As Integer For i = 0 To ubound(elements) Me.dropdownlist2.Items.Add(New ListItem(elements(i))) Next However, instead of New String()...
  3. needhelpso

    Dropdownlist question

    Here is what I have so far: X=0 While x<=52 Mystring(x)=x dropdownlist2.datatextfield=&mystring(x)& x=x+1 end while End Sub Does not work though
  4. needhelpso

    Dropdownlist question

    Hi all, I want to populate a drop down list with the integers 1 through 52. Instead of writing out a list item for each item I want to create an array to store the 52 values and then bind them to the dropdownlist. Any ideas on how to code this?
  5. needhelpso

    SQL statement not working

    Dim MyCommand2 as new OleDbDataAdapter(&quot;select * from timesheet where PayPeriod=&quot; & x & &quot;&quot;, MyConn) Hi all, I figured it out! Just to let you all know the problem was that I had an extra quote around the value X. I did not need this as the value of X was an integer! 5...
  6. needhelpso

    SQL statement not working

    Tried redesigning the database column payperiod and made it an integer. Made x an integer but still received datatype mismatch...no luck still :o(
  7. needhelpso

    SQL statement not working

    Even if I declare X as an integer and make x=12 I get type mismatch errors. But if I replace X in the SQL with 12 it is fine. However if I put payperiod='&quot;&12&&quot;'&quot;, I get an error. If I put payperiod=12 it is ok. Sub Button1_Click(sender As Object, e As EventArgs) Dim ds As...
  8. needhelpso

    SQL statement not working

    The column payperiod is a long datatype in the table. I tried making X a long but received the same error. It is really odd because this works: Dim MyCommand2 as new OleDbDataAdapter(&quot;select * from timesheet where PayPeriod=12&quot;, MyConn) The code above will bring back and display...
  9. needhelpso

    SQL statement not working

    Thanks for trying to help. Here is the error; I have X as an integer. Data type mismatch in criteria expression. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it...
  10. needhelpso

    SQL statement not working

    Thanks for the suggestion but I am still receiving datatype mismatch when I use that code. Any other ideas?
  11. needhelpso

    SQL statement not working

    I have a dropdownbox that I select a number. I assign the value of the box to x. I then want to use x in an sql statement. Here is the code for the button: Sub Button1_Click(sender As Object, e As EventArgs) Dim ds As DataSet =new DataSet() dim x as string x=dropdownlist1.selecteditem.value...

Part and Inventory Search

Back
Top