Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 102931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T01:02:37+00:00 2026-05-11T01:02:37+00:00

Here is my SQLCommand object: oCommand.CommandText = INSERT INTO hits (id,client_id,client_ip,page,vars) VALUES _ (@@IDENTITY,@client_id,@ip,@page,@vars)

  • 0

Here is my SQLCommand object:

oCommand.CommandText =  'INSERT INTO hits (id,client_id,client_ip,page,vars) VALUES _                      (@@IDENTITY,@client_id,@ip,@page,@vars)' oCommand.Parameters.Count = 4  >>   oCommand.Parameters.Item(0).ParameterName = '@client_id'  >>   oCommand.Parameters.Item(0).Value = '123456'  >>   oCommand.Parameters.Item(1).ParameterName = '@ip'  >>   oCommand.Parameters.Item(1).Value = '127.0.0.1'  >>   oCommand.Parameters.Item(2).ParameterName = '@page'  >>   oCommand.Parameters.Item(2).Value = 'default.aspx'  >>   oCommand.Parameters.Item(3).ParameterName = '@vars'  >>   oCommand.Parameters.Item(3).Value = Nothing 

This is the error I get:

‘The parameterized query '(@ip nvarchar(9),@client_id nvarchar(4000),@page nvarchar(12),@v' expects the parameter '@client_id', which was not supplied.‘

And here are the functions:

Public Shared Function insertIntoHitTable(ByVal oData As gsTrack) As Boolean     Dim oObj As New List(Of Object())     oObj.Add(New Object() {'@client_id', cV(oData.ClientID)})     oObj.Add(New Object() {'@ip', cV(oData.IP)})     oObj.Add(New Object() {'@page', cV(oData.Page)})     oObj.Add(New Object() {'@vars', oData.Vars})     Dim oCommand As SqlCommand = InsertIntoHitTableSQL(oObj)     oCommand.Connection.Open()     oCommand.ExecuteNonQuery()     oCommand.Connection.Close() End Function  Public Shared Function createSQLCommand(ByVal oCmdTxt As String, ByVal oParams As List(Of Object())) As SqlCommand     Dim oCommand As SqlCommand = Nothing     Dim oBuilder As New StringBuilder     Dim oParam As SqlParameter     oCommand = New SqlCommand(oCmdTxt, New SqlConnection(csString))     Try         For i As Integer = 0 To oParams.Count - 1             oParam = New SqlParameter             oParam.ParameterName = oParams(i)(0)             oParam.Value = oParams(i)(1)             oCommand.Parameters.Add(oParam)             oParam = Nothing         Next         Return oCommand     Catch ex As Exception         Return Nothing     End Try End Function 

Any pointers on how to resolve this parametrized query error? thanks!

EDIT

I should note that cV() just a scrubbing function, it checks to see if the passed variable is nothing.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T01:02:37+00:00Added an answer on May 11, 2026 at 1:02 am

    In the CV function are you checking to see if the value is null? One of the sites I see documents that you need to pass a value of DBNull.value instead of null.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 70k
  • Answers 70k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer According to the CSS 3 cursor specification: .myclass { cursor:… May 11, 2026 at 12:57 pm
  • added an answer def right_things(all_things, value) all_things.select{|x| x.attribute == value} end May 11, 2026 at 12:57 pm
  • added an answer A SQL TimeStamp is based on insert / update order… May 11, 2026 at 12:57 pm

Related Questions

Here is my code, which takes two version identifiers in the form 1, 5,
Here is my sample code: from xml.dom.minidom import * def make_xml(): doc = Document()
Here is my current question: I'm guessing that my problem (described below) is being
here is my directory structure. /user/a /user/b /user/b inside folder a,b,c there is a
I have a gridview that is databound in the code-behind using a stored procedure.
I got a web application, the problem is that the text in the label
If I run the two statements in batch will they return one table to
My current application is using an instance based data access layer. I instantiate the

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.