By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 1,249 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

Conversion from string "LLL" to type 'Integer' is not valid

P: 2
Hi. I cant fix it :( any ideas PLZ? :(

Expand|Select|Wrap|Line Numbers
  1.  Public Class Form1
  2.     Dim sqlConn As SqlConnection
  3.     Dim COMMAND As SqlCommand
  4.     Dim Query As String
  5.  
  6.     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  7.         sqlConn = New SqlConnection
  8.         sqlConn.ConnectionString = "data source = .\SQLEXPRESS;integrated security = true; initial catalog = Start_Data"
  9.         Dim READER As SqlDataReader
  10.  
  11.         Try
  12.             sqlConn.Open()
  13.             Query = "select * from START_AP_PHARMACY_CHECK"
  14.             COMMAND = New SqlCommand(Query, sqlConn)
  15.             READER = COMMAND.ExecuteReader
  16.  
  17.             While READER.Read
  18.                 Dim sName = READER.GetString("LLL")
  19.                 ComboBox1.Items.Add(sName)
  20.             End While
  21.  
  22.             sqlConn.Close()
  23.  
  24.         Catch ex As SqlException
  25.             MessageBox.Show(ex.Message)
  26.         Finally
  27.             sqlConn.Dispose()
  28.         End Try
  29.  
  30.     End Sub
  31.  
Jun 6 '14 #1
Share this Question
Share on Google+
1 Reply


iam_clint
Expert 100+
P: 1,208
http://msdn.microsoft.com/en-us/libr...vs.110%29.aspx

As you can see its expecting a column number to be passed.
What are you trying to do?
Oct 5 '14 #2

Post your reply

Sign in to post your reply or Sign up for a free account.