Casting of datatypes

Results 1 to 2 of 2

Thread: Casting of datatypes

  1. #1
    Join Date
    Dec 1969

    Default Casting of datatypes

    i have a var with value = &#039;100,200,300&#039;<BR>and i wanted to insert these values in DB so i have written code using substring and some more functions like it and got it as<BR>100<BR>200<BR>300<BR>but now when i am trying to insert it into DB it is giving me an error stating that<BR><BR>Error converting data type varchar to numeric.<BR><BR>what can i do to insert these values for numeric datatype field

  2. #2
    Join Date
    Dec 1969

    Default RE: Casting of datatypes

    Your problem is substring()<BR><BR>instead why not use split and put it into an array then iterate through the array to insert into the DB.<BR><BR>of course there is probably an even easier way, but as you don&#039;t show your code...

Posting Permissions

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