Solved

Input string was not in a correct format. error

Posted on 2010-09-07
3
725 Views
Last Modified: 2013-11-25
I'm getting this error:

Exception Details: System.FormatException: Input string was not in a correct format.

 vbssript code
The source looks like this <snippet>:

Dim CourseQuery
Dim CourseQuery_numRows
CourseQuery = Server.CreateObject("ADODB.Recordset")
CourseQuery.ActiveConnection = MM_connLearnDirectDB_STRING
CourseQuery.Source = "SELECT course.course_id, " & _
"course.course_name, " & _"course.summary, " & _
"provider.provider_id," & _

Open in new window


I'm converting the page over from asp to aspx , anyone know whats causing it?
0
Comment
Question by:darren-w-
3 Comments
 
LVL 22

Expert Comment

by:Om Prakash
ID: 33618952
0
 
LVL 11

Expert Comment

by:tobzzz
ID: 33619840
Line 6 needs to break into line 7 so this:
"course.course_name, " & _"course.summary, " & _
becomes
"course.course_name, " & _
"course.summary, " & _
0
 
LVL 13

Accepted Solution

by:
darren-w- earned 0 total points
ID: 33625546
Hi,

Tobzz, the snippet was a little wrong, the syntax is correct, I will give up on converting the form over from asp to aspx for now, reverted back to the previous version.

D
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question