+ Reply to Thread
Results 1 to 2 of 2

Help choosing appropriate data type

  1. #1
    Forum Contributor
    Join Date
    07-28-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    104

    Help choosing appropriate data type

    I have an excel worksheet that needs to upload data to a SQL Server database. I created a stored procedure, but I am having trouble choosing the correct data type for one of the parameters.

    Here is the basics of the stored procedure (I could not supply all of it, as the site is thinking it is a SQL Insertion Attack):
    Please Login or Register  to view this content.
    Here is my code to use the stored procedure:

    Please Login or Register  to view this content.
    The error description I get is [Microsoft][SQL Server Native Client 10.0][SQL Server]Procedure or function 'AddCallEvaluation' expects parameter '@TotalScore', which was not supplied.

    Currently, the tables have no data, so I can play around with the data types until I figure out the one that works. It does not seem to like FLOAT (and use adSingle or adDouble for the ADO type) or REAL (and use adSingle for the ADO type). I tried adding 24 for the size (so that line would read:
    Please Login or Register  to view this content.
    but that did not work). I tried a MsgBox to display the data, and it showed an integer value at the moment. It seems very likely that I just chose a datatype that is difficult to work with. Should I use precision datatypes like Decimal? I am just banging my head against the wall at the moment and was hoping for some advice.

    EDIT: I am very confused now. I just changed the parameter to NVARCHAR(50) and then cast it to a REAL in the stored procedure. So, now it just needs to pass in text. It still gives the exact same error! Now, I have no clue what it is looking for.
    Last edited by SlipEternal; 09-15-2017 at 05:07 PM. Reason: Solved my problem

  2. #2
    Forum Contributor
    Join Date
    07-28-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    104

    Re: Help choosing appropriate data type

    I figured it out! I needed to add:

    Please Login or Register  to view this content.
    And it worked.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Choosing latest set of data
    By sammymalta in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 04-14-2014, 09:16 AM
  2. Replies: 0
    Last Post: 09-03-2013, 11:26 AM
  3. Replies: 0
    Last Post: 07-24-2013, 01:36 AM
  4. Replies: 1
    Last Post: 08-08-2012, 02:39 PM
  5. Data as per Choosing the Options
    By vijaymohan in forum Excel General
    Replies: 1
    Last Post: 05-01-2012, 11:34 PM
  6. choosing right type of chart- multiple categories
    By Kris19 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 03-23-2011, 09:44 AM
  7. choosing data from list
    By itayb34 in forum Excel General
    Replies: 1
    Last Post: 08-15-2009, 05:30 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1