VB.NET School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Page 1 of 1
  • You cannot start a new topic
  • Reply Reply

how to store file in sql server through vb.net Rate Topic: -----

#1 dpksngl  Icon User is offline

  • New D.I.C Head
  • Pip

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 29-November 07


Dream Kudos: 0

Share |

how to store file in sql server through vb.net

Posted 05 December 2007 - 03:38 AM

hey i want to insert pdf into sql server database thruogh vb.net

how can i do that
Was This Post Helpful? 0
  • +
  • -


#2 PsychoCoder  Icon User is offline

  • iHater.Init(this);
  • Icon

Reputation: 1364
  • View blog
  • Posts: 19,696
  • Joined: 26-July 07


Dream Kudos: 12925

Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net, jQuery

Re: how to store file in sql server through vb.net

Posted 05 December 2007 - 05:25 PM

Well, coming from the "Efficient Programing" background I come from Id say that is a bad, bad idea. Storing actual documents, especially of special format like a PDF is a performance issue waiting to bit you in the a**.

What you want to do is store the document in a folder on the users computer, usually the

GetFolderPath(SpecialFolder.ApplicationData) & _
"\" & Application.ProductName & "\" & sFileName



That puts it in the C:\Documents and Settings\<UserName>\Application Data\<Application Name>\,FOle Name>, then in the database store the name of the document, the path (if you chose to) and the display name you wish to use. Storing entire PDF's is a performance issue though.
Was This Post Helpful? 1

Page 1 of 1
  • You cannot start a new topic
  • Reply Reply


Fast Reply

  

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users