November 29, 2012 at 9:41 am
I need to take the value from one text box txtSupply, assign it to a variable and then insert it into a column (Supply, int) in SQL table.
What data type should be set for this variable, using string or integer?
November 29, 2012 at 9:43 am
adonetok (11/29/2012)
I need to take the value from one text box txtSupply, assign it to a variable and then insert it into a column (Supply, int) in SQL table.What data type should be set for this variable, using string or integer?
If it is integer data you should use integer.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
November 29, 2012 at 9:50 am
What is the data type of txtsupply and what are the actual values it holds?
If its a string then your destination column should also be string else integer!
Pavan.
November 29, 2012 at 9:57 am
dba_pkashyap (11/29/2012)
What is the data type of txtsupply and what are the actual values it holds?If its a string then your destination column should also be string else integer!
Pavan.
The OP said the destination table is an int. So it should be an int.
To the OP: I would suggest that you not use a textbox to capture integer data. Use something like a spinedit or a dropdown.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply