Solved

vb.net Store hashtable in SQL Database Field

Posted on 2010-08-30
2
872 Views
Last Modified: 2012-05-10
I am trying to figure out how to store a hashtable in a MS Sql Server tables field.  I do not want to create a file in the process,  I simply want to store the hashtble in a field of the sql server table.
0
Comment
Question by:Sitewizard
2 Comments
 
LVL 28

Accepted Solution

by:
Ryan McCauley earned 500 total points
ID: 33568732
Are you looking to store the hashtable in a database with each pair as a row (key in one column, value in another), or in a single cell (serializing the hash table and storing it in one place)? I don't believe there's any way to store it as a set of pairs without iterating over the table and dealing with each key/value pair (maybe an ORM like NHibernate could do it, but I don't suspect it could), but to serialize it to the database, you can use the code at the following link:

http://blogs.techrepublic.com.com/howdoi/?p=143
0
 

Author Comment

by:Sitewizard
ID: 33569215
I was looking to serialize the hashtable and store it in on binary field in the sql server.  i will have a look at the link you prvided.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This video discusses moving either the default database or any database to a new volume.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now