Netlink2
asked on
dataadapter saving tinyint or boolean data as 255 in table no matter if true or false
The following is the code.
Using db As New MyDataAdapter(
dim garage as boolean, carport as boolean
carport = true
garage = false
adId = CInt(db.InsertAd(garage, carport, membername))
which calls:
ALTER PROCEDURE InsertAd
(
@garage tinyint,
@carport tinyint,
@logo ntext,
@membername ntext
)
AS
DECLARE @Id int;
SET NOCOUNT OFF;
INSERT INTO MyTable
(garage,carport,membername )
VALUES (@garage,@carport,@membern ame)
SET @Id = @@IDENTITY
SELECT @Id AS [Id]
The values in both @garage and @carport are 255 despite the fact that one value should be true and the other should be false
Using db As New MyDataAdapter(
dim garage as boolean, carport as boolean
carport = true
garage = false
adId = CInt(db.InsertAd(garage, carport, membername))
which calls:
ALTER PROCEDURE InsertAd
(
@garage tinyint,
@carport tinyint,
@logo ntext,
@membername ntext
)
AS
DECLARE @Id int;
SET NOCOUNT OFF;
INSERT INTO MyTable
(garage,carport,membername
VALUES (@garage,@carport,@membern
SET @Id = @@IDENTITY
SELECT @Id AS [Id]
The values in both @garage and @carport are 255 despite the fact that one value should be true and the other should be false
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER