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:
01103664
Views:
11
>>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?

Actually, I just tried hard coding a numeric value(without quotes) and it took. So there must be something amiss with the textbox value. I have tried to code it like textbox1.text=CInt(textbox1.text). How would I actually check it before the insert?
"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
Next
Reply
Map
View

Click here to load this message in the networking platform