Invalid Column Name Data Reader Integer Only

Results 1 to 2 of 2

Thread: Invalid Column Name Data Reader Integer Only

  1. #1
    Join Date
    Dec 1969

    Default Invalid Column Name Data Reader Integer Only

    I am working with this script I found here<BR><BR><BR>It will work as long as the pub_id field remains numeric.<BR>pubid=1234 will work; pubid=ABCD will not.<BR><BR>When I try to use alpha characters, or change the data type<BR>I will get an invalid column error.<BR><BR><BR>Any way around that to use alpha or alpha numeric?<BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default Change the database...

    Change the type of that field in the db table to VARCHAR(20) or something of that ilk.<BR><BR>Integers are *always* ONLY numbers.<BR><BR>I see that the article is using the standard MS "Pubs" database, so it&#039;s only natural that they would allow only integers, as that&#039;s an @@IDENTITY (or AUTOINCREMENT, depending on what db you are using) field, which *is* only integers.<BR><BR>Hate to tell you this, but it&#039;s time to learn something about databases. Get some *good* docs on whatever DB you are using, SQL Server or Access. (Both come with pretty reasonable docs, so start there.)<BR><BR><BR><BR><BR>

Posting Permissions

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