|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
download files from database
do anyone knows how to download files from database to a certain path...using asp and sql server 7...plz help
|
|
#2
|
|||
|
|||
|
Dim sServer,sDBName,sUsername,sPassword
Dim strConn,strSQL,objConn,objRS sServer="Your Server Name" sDBName = "Your Database Name" sUsername = "Your User Name" sPassword = "Your Password" strConn = "Provider=sqloledb;Data Source=" & sServer & ";Initial Catalog=" & sDBName & ";User Id=" & sUsername & ";Password=" & sPassword Set objConn = Server.CreaeObject("Adodb.Connection") objConn.Open strConn 'for example.your table have two fields.they are "download_fiel_Id" and "download_file_path". Set objRS = objConn.Execute("SELECT * FROM [your table] WHERE id=" & download_file_id) If Not objRS.Eof Then Response.Redirect objRS("download_file_path") Else Response.Write ("file not found!") End If objConn.Close Set objConn = Nothing |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > download files from database |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|