custom type into access?

  • Thread starter Thread starter James
  • Start date Start date
J

James

Hi
I would like to add a custom object to my access database - if I create
a byte array, can i serialize this object to an access database? - If so
what type would I set the access column to and how would this be done on the
commandstring?

Thanks
James
 
Hi James,

James said:
Hi
I would like to add a custom object to my access database - if I create
a byte array, can i serialize this object to an access database?

Certainly

- If so
what type would I set the access column to and how would this be done on
the commandstring?

Here is an example for sql server:
http://support.microsoft.com/kb/316887/EN-US/

It shouldn't be too difficult to modify it for access/jet. (I think Jet uses
MEMO data type for storing BLOBs).
 
Miha Markic said:
Hi James,

James said:
Hi
I would like to add a custom object to my access database - if I
create a byte array, can i serialize this object to an access database?

Certainly

- If so
what type would I set the access column to and how would this be done on
the commandstring?

Here is an example for sql server:
http://support.microsoft.com/kb/316887/EN-US/

It shouldn't be too difficult to modify it for access/jet. (I think Jet
uses MEMO data type for storing BLOBs).

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/
Thanks
James

Thanks - This is great... Does anyone know what the maximum object size is
for access...

Thanks
James
 
Hi James,

Perhaps I wrongly suggested a memo field (sorry about that) - it is for
storing large strings - up to 65536 chars according to access help file.
Instead use OLE Object field type - it "Stores up to 1 gigabyte (limited by
disk space). ".

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

James said:
Miha Markic said:
Hi James,

James said:
Hi
I would like to add a custom object to my access database - if I
create a byte array, can i serialize this object to an access database?

Certainly

- If so
what type would I set the access column to and how would this be done on
the commandstring?

Here is an example for sql server:
http://support.microsoft.com/kb/316887/EN-US/

It shouldn't be too difficult to modify it for access/jet. (I think Jet
uses MEMO data type for storing BLOBs).

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/
Thanks
James

Thanks - This is great... Does anyone know what the maximum object size is
for access...

Thanks
James
 
Miha Markic said:
Hi James,

Perhaps I wrongly suggested a memo field (sorry about that) - it is for
storing large strings - up to 65536 chars according to access help file.
Instead use OLE Object field type - it "Stores up to 1 gigabyte (limited
by disk space). ".

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

James said:
Miha Markic said:
Hi James,

Hi
I would like to add a custom object to my access database - if I
create a byte array, can i serialize this object to an access database?

Certainly

- If so
what type would I set the access column to and how would this be done
on the commandstring?

Here is an example for sql server:
http://support.microsoft.com/kb/316887/EN-US/

It shouldn't be too difficult to modify it for access/jet. (I think Jet
uses MEMO data type for storing BLOBs).

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/


Thanks
James

Thanks - This is great... Does anyone know what the maximum object size
is for access...

Thanks
James

ah - great - do you happen to know what i should do with the declaration of
the column in my table creation routine - instead of IUnknown - see below...
ocomm.CommandText = "CREATE TABLE " + sname + " (DT DATETIME NOT NULL,
Transfers IUnkown)";

James
 
Miha Markic said:
Hi James,

Perhaps I wrongly suggested a memo field (sorry about that) - it is for
storing large strings - up to 65536 chars according to access help file.
Instead use OLE Object field type - it "Stores up to 1 gigabyte (limited
by disk space). ".

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

James said:
Miha Markic said:
Hi James,

Hi
I would like to add a custom object to my access database - if I
create a byte array, can i serialize this object to an access database?

Certainly

- If so
what type would I set the access column to and how would this be done
on the commandstring?

Here is an example for sql server:
http://support.microsoft.com/kb/316887/EN-US/

It shouldn't be too difficult to modify it for access/jet. (I think Jet
uses MEMO data type for storing BLOBs).

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/


Thanks
James

Thanks - This is great... Does anyone know what the maximum object size
is for access...

Thanks
James

Thanks for your help - had a few BADBINDINFO Probems with the dbTypes - but
all is well now I used this to create my tables
ocomm.CommandText = "CREATE TABLE " + sname + " (DT DATETIME NOT NULL,
Transfers OLEOBJECT)";

and then simply used byte[]'s in and out - good! - thanks again.

James
 
Back
Top