473,401 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

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

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 3 '14 #1
0 1245

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

Similar topics

10
by: dave | last post by:
I am reading input from a form. I want to validate the input by making sure that the string is actually an integer. How would I do this? Do i need to convert it to a character array and break down...
6
by: Alex Neumann | last post by:
Hi, I need a function which converts an string to an integer. Currently I have this: bool string2int(char* digit, int& result) { result = 0; if (!(*digit >= '0' && *digit <='9'))
7
by: sakitah | last post by:
Hello Everyone, Here's the problem: I have a string that I break down into 3 other strings as such: string1 = "001-202-1234567" and parsing it into: string2 = "001";
5
by: sathyashrayan | last post by:
Group, I have some doubts in the following program. ------------------program--------------------- /* ** Make an ascii binary string into an integer. */ #include <string.h> unsigned int...
4
by: Ken Varn | last post by:
I have an unknown numeric Type object passed into a function. I want to run a conversion on a string to convert the string to that Type object and return an object of that type. Is there some way...
3
by: William Mild | last post by:
I am porting old Dreamweaver generated ASP code to ASP.NET (VBScript to VB.NET). Error: Cast from type 'Field' to type 'Integer' is not valid The error occurs on the line which says "rsStudents =...
4
by: Portroe | last post by:
on running debug I get the following error, ' cast from string "" to type 'integer' is not valid,' I am experimenting with file writing and reading, what sort of error am I looking for in my...
2
by: Jim in Arizona | last post by:
I'm learning form an ASP.NET 1.0 book and I tried out some code that returns this error: Compiler Error Message: BC30311: Value of type 'Integer' cannot be converted to...
2
by: Michael | last post by:
I need some help. I have the following code: cmSQL = New SqlCommand("nf_AddPurchaseOrder", cnSQL) cmsql.CommandType = CommandType.StoredProcedure cmsql.Parameters.Add("@PurchaseOrderId",...
2
by: rhepsi | last post by:
When im trying to update the files from worker file, im getting this error... plz help..
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.