473,394 Members | 1,739 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,394 software developers and data experts.

Application uses a value of the wrong type for the current operation

10
i have been struggling with this error for a while , i changed to many times to make sure no error but no luck


Error on line 29
strsql.Parameters("@columna") = strmake




<%

Dim objCN ' ADO Connection object
Dim objRS ' ADO Recordset object
Dim strsql ' SQL query string
Dim RecordsArray ' To hold the Array returned by GetRows
Dim i ' A counter variable
Dim strmake
Dim objDBParam3

' Create a connection object
Set objCN = Server.CreateObject("ADODB.Connection")

' Connect to the data source
objCN.Open "coonection;"
set strsql = Server.CreateObject("ADODB.Command")
strsql.ActiveConnection = objCN
strsql.CommandText = "SELECT model ,CAT_ID FROM new WHERE CAT_ID = ? "
strsql.CommandType = 1

strmake = "1"
If (Request.QueryString("catid") <> "") Then
strmake = Request.QueryString("catid")
End If

set objDBParam3 = strsql.CreateParameter("@columna",5, 1, -1)
strsql.Parameters.Append objDBParam3
strsql.Parameters("@columna") = strmake
set objDBParam3 = Nothing
set objRS = strsql.Execute

If objRS.EOF Then

Response.Write "Erreur"
Response.End
end if
RecordsArray = objRS.GetRows()

%>
<input name="marque" type="hidden" value="<%=RecordsArray(2, i) %>" >
<select name="model" onchange="getCarburation(<%= RecordsArray(1, i) %>,this.value)">
<option value="">Tous</option>
<% For i = 0 To UBound(RecordsArray, 2)%>


<option value="<%=RecordsArray(0, i)%>"><%=RecordsArray(0, i)%></option>
<%
Next
Response.write "</select>"
'End if
objRS.Close
objCN.Close
Set objCN = Nothing
Set objRS = Nothing
%>

I appreciate your help
Mar 19 '09 #1
4 7638
jdom
10
Any one has any idea?

Thank you
Mar 23 '09 #2
jhardman
3,406 Expert 2GB
The best way to troubleshoot SQL issues are to 1- print out the sql commands (or queries) and 2- enter them directly into a query analyzer. You shouldbe able to see the same error. Have you tried entering it into a query analyzer yet?

Jared
Mar 26 '09 #3
I'm not sure how sql parameters work but should you not convert the parameter to an integer? They are strings in your code.
Sep 11 '09 #4
Hi,

Please give the error code or error msg....

Please try this

strsql.Parameters("@columna") = strmake

strsql.Parameters("@columna") = Cint(strmake)


I dont know correct solution.post your error msg..
Sep 17 '09 #5

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

Similar topics

4
by: Richard Davies | last post by:
Hi I have a ASP and SQL Server website which uses a couple of Stored Procedures during the Shopping Cart process. 1 inserts the Customer information into a table and the next inserts the Payment...
1
by: | last post by:
I have a inquiry form that works perfectly under nearly every condition I test. Yet, I seem to be getting increasing error messages from users and I cannot figure out the cuase of the problem:...
4
by: tommy | last post by:
hello everbody, i write a little asp-application with forms-authentication. i copy my aspx-files with web.config to my webspace and i get the error above... i tried to set the...
5
by: adolf garlic | last post by:
Suggestions please for strategy to share values across app. Scenario: I have an asp.net app that uses some com components along with .net classes. Configuration settings for various things...
2
by: Matthew Hood | last post by:
My company has expressed a desire to convert an existing MS Access application to a full VB.NET application. My experience is with VB6 so I want to ask a few questions and get some input on the...
7
by: stephan querengaesser | last post by:
hi ng, i try to invoke a webservice-method with an filter-object, that contains value types. if i donīt want to filter the return value of the method, i have to pass a new instance of the...
3
by: ApexData | last post by:
Hello I completed an application that worked great until I went to STARTUP and shut off all of the checkboxes. My code uses "Application.CurrentObjectName" to get the current Form name. All my...
0
bartonc
by: bartonc | last post by:
With one small change to the view/control: self.staticText3 = wx.StaticText(id=wxID_DBCONNECTDIALOGSTATICTEXT3, label='ODBC Data Source Name', name='staticText3',...
0
by: =?Utf-8?B?UG9sbHkgQW5uYQ==?= | last post by:
Hi, I have previously used EL v 3.1 Exception Handling application block successfully. I thought I would now try to do the same with EL v 4.0. My first experiment was to replace an exception....
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...

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.