|
| |
|
|
Chameleon
Posts: 84 From: Springfield, MO Status: offline
|
Update issue - 5/16/2002 9:56:58
I am trying to create a unique ID by combining input from two fields in my SQL db. The first field is an integer and the second is char. I am trying to combine them and save them into a char field but I am getting this error. I know there is a way around this but I can't think of it to save my life. Here is the error... Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80040E07) [Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting the varchar value 'Jas' to a column of data type int Thanks
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: Update issue - 5/16/2002 11:08:48
Try something like this: DIM myVar myVar = fieldOne & fieldTwo Then make sure you're writing myVar to a text field. As a side note, if you did this: myVar = fieldOne + fieldTwo you would probably get that error. Just a guess...
|
|
|
|
Chameleon
Posts: 84 From: Springfield, MO Status: offline
|
RE: Update issue - 5/16/2002 16:00:25
I got that working. thanks. But I've run into another issue with it... I am taking the two fileds and combining them into 1 to create a unique ID. This works fine whn I have the number field before the text feild but when I switch them to text first and then number(which is how I need it) I get this error... Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80040E57) [Microsoft][ODBC SQL Server Driver][SQL Server]String or binary data would be truncated. I've checked Microsofts site and couldn't find jack. This should be updateing into a SQL 2000 db and field of the data type char. I have tried changing the data type but have had no luck. Any help would be appreciated.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|