dwg file in sql
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
dwg file in sql

 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA
Author Message
kishore1981
Guest





Posted: Fri Mar 18, 2005 10:01 am    Post subject: dwg file in sql Reply with quote

hi ,
i want to know how to store the dwg file in sql database..
and getback.

please help me in this regard

kishore

Back to top
Alfred NESWADBA
Guest





Posted: Fri Mar 18, 2005 4:37 pm    Post subject: Re: dwg file in sql Reply with quote

hi hishore,


by default database-server are only built to store/search values of type text/number/boolean.
so you need a database-server/-software that can store geometry.

before we can discuss the (many) different ways we need to know what sql-server-product?

- alfred -




In article <21796189.1111138179014.JavaMail.jive@jiveforum2.autodesk.com>, nospam@address.withheld says...
Quote:
hi ,
i want to know how to store the dwg file in sql database..
and getback.

please help me in this regard

kishore
Back to top
Norman Yuan
Guest





Posted: Sat Mar 19, 2005 1:02 am    Post subject: Re: dwg file in sql Reply with quote

You certainly can do it. Such data saved in database is called BLOB (Binary
Large OBject). Many (most?) database developers are against saving file in
database as binary data, especially when the file size is fairly big, such
as AutoCAD drawing. They recommend to save file path/name in databae
instead.

Simply search MS Knowledge Base for "BLOB", you will get everything yu want
to know on how to save/retrieve BLOB from SQL Server database/Jet database.

"kishore1981" <nospam@address.withheld> wrote in message
news:21796189.1111138179014.JavaMail.jive@jiveforum2.autodesk.com...
Quote:
hi ,
i want to know how to store the dwg file in sql database..
and getback.

please help me in this regard

kishore


Back to top
Alfred NESWADBA
Guest





Posted: Sat Mar 19, 2005 1:48 am    Post subject: Re: dwg file in sql Reply with quote

norman,

that's why i asked a few additional questions. just to save dwgs as blobs
into a database is the really last choice i would use, because there is
no advantage against saving dwg in standard filesystem. so you could not
search for any coordiantes/blockrefs/attributes/text/layernames/...

let's wait for the answer from kishore

- alfred -



In article <423b33b0$1_3@newsprd01>, NotReal@NotReal.not says...
Quote:
You certainly can do it. Such data saved in database is called BLOB (Binary
Large OBject). Many (most?) database developers are against saving file in
database as binary data, especially when the file size is fairly big, such
as AutoCAD drawing. They recommend to save file path/name in databae
instead.

Simply search MS Knowledge Base for "BLOB", you will get everything yu want
to know on how to save/retrieve BLOB from SQL Server database/Jet database.

"kishore1981" <nospam@address.withheld> wrote in message
news:21796189.1111138179014.JavaMail.jive@jiveforum2.autodesk.com...
hi ,
i want to know how to store the dwg file in sql database..
and getback.

please help me in this regard

kishore


Back to top
Wyatt Earp
Guest





Posted: Sat Mar 19, 2005 2:28 am    Post subject: Re: dwg file in sql Reply with quote

You need to create an "Image" data field in a sql table (at least
that's what MS-SQL Server calls it) and stick the filebytes of the file
in there.
Back to top
kishore1981
Guest





Posted: Sat Mar 19, 2005 10:04 am    Post subject: Re: dwg file in sql Reply with quote

hi all,
thanks for ur replies . but i did not got the solution

let me brief about my requirement .

i want to control the versions of every dwg file . copying in a different folders is not solving this problem
and it is giving me headace to find the which version is the correct one . and more as data in folder is not more safest than the data in sql server.

so i hope u got my problem.

please help me to store the dwg file in sql. i got the code for image storing in sql but that is not working out for dwg file.

thanks and regards
kishore chinna
Back to top
Alfred NESWADBA
Guest





Posted: Sat Mar 19, 2005 4:13 pm    Post subject: Re: dwg file in sql Reply with quote

hi,

as already mentioned i think just to move a dwg file into a blob-field of a database
is not (my) preferred way.

my suggestion (one of maybe hundreds of possibilities):
i would hold information of filenames and correspondig
file- & version-information in the database,
so the user gets search-funktions to find the drawing-record.
in the drawingrecord you have the filename and your app
can control the opening of the specific file.

if you want to restrict access to old revisions of a dwg, then you
can add a rename function of files and replace for example the
file extension against the version-number (for example "filename.dwg.ver001")


the advantages:
the user has access to xref's (not if they are not in filesystem)
the user can open dwg's faster (no copy from database-blob to filesystem)



if you want to stay on your solution, then you are in the wrong newsgroup
because that question is not autocad-specific, search at microsoft or
google on how to read/write blobs.

http://support.microsoft.com/default.aspx?scid=kb;en-us;317016

- alfred -



In article <17737052.1111220249508.JavaMail.jive@jiveforum2.autodesk.com>, nospam@address.withheld says...
Quote:
hi all,
thanks for ur replies . but i did not got the solution

let me brief about my requirement .

i want to control the versions of every dwg file . copying in a different folders is not solving this problem
and it is giving me headace to find the which version is the correct one . and more as data in folder is not more safest than the data in sql server.

so i hope u got my problem.

please help me to store the dwg file in sql. i got the code for image storing in sql but that is not working out for dwg file.

thanks and regards
kishore chinna
Back to top
Frank Oquendo
Guest





Posted: Sat Mar 19, 2005 9:18 pm    Post subject: Re: dwg file in sql Reply with quote

kishore1981 wrote:

Quote:
i want to control the versions of every dwg file

Sounds like you're trying to replicate Autodesk Vault or any number of
off-the-shelf PDM products. It would most likely be a far more efficient
use of your time to purchase a ready-made solution.

However, if you simply must go this route you should know that a DWG
file can be stored only as a BLOB and not any form of indexable,
seachable data. After all, it is simply a single binary object.

Instead, your database should contain the location of the file and
record data describing the DWG such as document properties.
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB