Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data type mismatch
Message
 
To
10/03/2006 18:13:53
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Miscellaneous
Thread ID:
01103208
Message ID:
01103337
Views:
12
>>I've been stuck trying to figure this one out. In an ASP VB web page, I am doing an insert into a VFP table and 1 field is numeric. One insert parameter that has its parameter source bound to a textbox is to be inserted into this table whose field is the numeric one called RECID.Command is this:
>>
>>SqlDataSourceDash6.InsertCommand = "insert into dash6 (docid,routid,fscm,part_nbr,u_I,quantity,requisiton,jon,recid) values (?,?,?,?,?,?,?,?,?)"
>>if I make the RECID field of type char, I do not get "Data type mismatch" at all
>
>Let's see. You're writing to a Fox table so you know the table structure, and the field in question is definitely numeric. Does the insert statement work if you hard code some values instead of the parameters? (That would check your Insert statement.)
>
>You're getting the parameter value from input to your web page. What exactly is the value you're sending? Can you check it before your insert occurs? Any chance something in the web page isn't working as expected and you're getting a character value assigned to your parameter?

Cindy, I have attempted to hard code a numeric, so as to look like this

SqlDataSourceDash6.InsertCommand = "insert into dash6 (docid,routid,fscm,part_nbr,u_I,quantity,requisiton,jon,recid) values (?,?,?,?,?,?,?,?,25)"

But I got the same error. Was that the correct way to hard code it?
"Build a man a fire, and he's warm for a day.
Set a man on fire, and he's warm for the rest of his life."
Previous
Reply
Map
View

Click here to load this message in the networking platform