Re: Invalid character value for cast specification

Dale E. Reed Jr. ( (no email) )
Sat, 18 Jul 1998 22:44:47 -0700

George Mansoor (LS) wrote:
> I found out the reason for this error. I tried to change the type of
> AccountID from int to varchar (setting it the same as the login id). The
> reason I did this was because I wrote a stored procedure to add accounts to
> my radius database. The when the stored procedure inserts a row into
> subaccounts, the identity column (accountid) isn't incremented correctly.

You can't do that. The accountID MUST be an integer. Its used in
checking the RadConfigs table in the authentication.

> Does anyone know how I can insert a row into subaccounts using a stored
> procedure?

Just use the old fashion:

INSERT INTO SubAccounts(field1, ...) VALUES(field1, ...)

statement. Maybe I missed the original issue?

-- Dale E. Reed Jr.  (       IEA Software, Inc.      |  RadiusNT, Emerald, and NT FAQs Internet Solutions for Today  |