Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Closed Thread
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 13th, 2003, 04:18 AM
Registered User
Join Date: Sep 2003
Location: Pune, Maharashtra, India.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to s_chirags Send a message via Yahoo to s_chirags
Default ASP.Net (Varbinary)

Hello All,

Currently I am working on Cold Fusion and SQL Server and planning to switch over to ASP.Net and SQL Server.
My Application maintains the ID's of all the tables in VARBINARY(8) datatype of SQL Server.
I have one query in ASP.Net using SQL Server with the same tables.

I have a table called "Books" which has 2 columns "BookID and Title" respectively, where in datatype of BookID is VARBINARY(8) and Title as VARCHAR(64).
Please find the table script with insert statement for the Dummy Data of 5 records below.

-------------Start SQL Script-------------------
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tb_book]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tb_book]

CREATE TABLE [dbo].[tb_book] (
    [BookID] [varbinary] (8) NOT NULL ,
    [Title] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL

insert into tb_book values(0x00000000003DF485, 'ASP')
insert into tb_book values(0x00000000003DF48A, 'JSP')
insert into tb_book values(0x00000000003DF48D, 'ASP.Net')
insert into tb_book values(0x00000000003DF49D, 'VB.Net')
insert into tb_book values(0x00000000003DF4A0, 'SQL Server')

----------------End SQL Script-------------------

Now the problem which I am facing is when I select all the records from "Books" tables and list it on page using DataGrid the "BookID" column which has datatype "VARBINARY(8)" is not displayed in grid that means only Title are displayed and not the BookID. And every record has the the Delete image in front of it to delete the record. On click of the Delete image the BookID is passed to some "xyz page" in form of the QueryString to the stored procedure to delete the record.

So my query is I am not getting the BookID to assign it to Delete image.

Can anyone please help me out in working with VARBINARY(8) datatype using ASP.Net. It would be appreciable if anyone could solve the query of mine and even send the code of it.

NOTE: I don't want the solution to convert the VARBINARY(8) value to any Different Datatype in the SQL Server as this is not possible for me as there are a thousands of stored procedures written using the VARBINARY(8) datatype.



Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Varbinary(max) performance issue musman0047 SQL Language 0 May 8th, 2008 08:20 PM
Turning a regular ASP.NET App into an AJAX ASP.Net donrafeal7 Ajax 2 August 31st, 2007 12:33 AM
Storing data in a varbinary field in SQL mswombat Java Basics 2 February 9th, 2007 08:03 AM
retrieve varbinary using StoredProc with OUTPUT ag19702004 ADO.NET 0 November 30th, 2005 01:37 PM

All times are GMT -4. The time now is 05:58 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.