|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
VBScript - General - Error - Error in ODBC driver
hi
i am trying to create upload video files in asp with mysql database. On localhost i can upload video files and easily view them without any error, but while making online it shows me error described below Microsoft OLE DB Provider for ODBC Drivers error '80040e21' ODBC driver does not support the requested properties. can anyone please help me out how can i get rid of this error |
|
#2
|
||||
|
||||
|
Does the error point to a specific line number, if so, can you post all of the relevant code.
Also, have you set the relevant permissions on the folder you are uploading to? |
|
#3
|
|||
|
|||
|
yes, error points to specific line as given
Microsoft OLE DB Provider for ODBC Drivers error '80040e21' ODBC driver does not support the requested properties. /medical/doctor/myprofile_edit.asp, line 66 also i have set all permission for read/write to folder where i am uploading files |
|
#4
|
||||
|
||||
|
Quote:
You havent posted any code so we cant see what that line is trying to do. |
|
#5
|
|||
|
|||
|
view my full code below :
Code:
<!-- #include file="db.asp" -->
<!-- #include file="functions.asp" -->
<%
Server.ScriptTimeout = 180
Response.Expires=0
Response.Buffer = TRUE
Response.Clear
byteCount = Request.TotalBytes
'on error resume next
RequestBin = Request.BinaryRead(byteCount)
dir1=server.MapPath("../")
'dir1=("C:\Inetpub\wwwroot\medical\final\doctor\")
uploadpath = dir1+"\doctor\upfiles"+"\"
Dim UploadRequest
Set UploadRequest = CreateObject("Scripting.Dictionary")
BuildUploadRequest RequestBin
'on error resume next
'file 1
contentType = UploadRequest.Item("doctor_photo").Item("ContentType")
filepathname = UploadRequest.Item("doctor_photo").Item("FileName")
filename = Right(filepathname,Len(filepathname)-InstrRev(filepathname,"\"))
if not filename="" then
value = UploadRequest.Item("doctor_photo").Item("Value")
xsSImage = filename
Set ScriptObject = Server.CreateObject("Scripting.FileSystemObject")
Set MyFile = ScriptObject.CreateTextFile(uploadpath+""+filename)
For i = 1 to LenB(value)
MyFile.Write chr(AscB(MidB(value,i,1)))
Next
MyFile.Close
set myfile = nothing
end if
'file 2
contentType = UploadRequest.Item("doctor_video").Item("ContentType")
filepathname = UploadRequest.Item("doctor_video").Item("FileName")
filename = Right(filepathname,Len(filepathname)-InstrRev(filepathname,"\"))
if not filename="" then
value = UploadRequest.Item("doctor_video").Item("Value")
xsLImage = filename
Set ScriptObject = Server.CreateObject("Scripting.FileSystemObject")
Set MyFile = ScriptObject.CreateTextFile(uploadpath+""+filename)
For i = 1 to LenB(value)
MyFile.Write chr(AscB(MidB(value,i,1)))
Next
MyFile.Close
set myfile = nothing
end if
lngRecordNo = CLng(UploadRequest.Item("id").Item("Value"))
set rsSelect = Server.CreateObject("ADODB.Recordset")
rsSelect.CursorType = 3
rsSelect.LockType = 3
sqlSelect = "select * from doctorlogin WHERE id =" & lngRecordNo
rsSelect.Open sqlSelect,objConn
rsSelect.Update
rsSelect("doctor_uname")=UploadRequest.Item("doctor_uname").Item("Value")
rsSelect("doctor_pass")=UploadRequest.Item("doctor_pass").Item("Value")
rsSelect("firstname")=UploadRequest.Item("firstname").Item("Value")
rsSelect("lastname")=UploadRequest.Item("lastname").Item("Value")
rsSelect("doctor_type")=UploadRequest.Item("doctor_type").Item("Value")
rsSelect("address")=UploadRequest.Item("address").Item("Value")
rsSelect("address1")=UploadRequest.Item("address1").Item("Value")
rsSelect("phone")=UploadRequest.Item("phone").Item("Value")
rsSelect("email")=UploadRequest.Item("email").Item("Value")
rsSelect("country")=UploadRequest.Item("country").Item("Value")
rsSelect("docstate")=UploadRequest.Item("docstate").Item("Value")
rsSelect("doctor_photo")=xsSImage
rsSelect("doctor_video")=xsLImage
rsSelect.update
rsSelect.close
response.Redirect("myprofile_view.asp?msg=Doctor has been Edited Successfully")
%>
it shows me error Microsoft OLE DB Provider for ODBC Drivers error '80040e21' ODBC driver does not support the requested properties. /medical/doctor/myprofile_edit.asp, line 66 Last edited by sync_or_swim : July 3rd, 2009 at 06:50 AM. Reason: Added code tags |
|
#6
|
||||
|
||||
|
Can you post the contents of db.asp so we can see the connection string that you are using?
|
|
#7
|
|||
|
|||
|
db.asp
<% 'Dim objConn set objConn = server.CreateObject ("adodb.connection") objConn.open "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=dbname.db.3604341.hostedresource.com; PORT=3306; DATABASE=dbname; USER=username; PASSWORD=password; OPTION=16387;" %> Last edited by naturebest07@gm : July 4th, 2009 at 06:50 AM. |
|
#9
|
|||
|
|||
|
thanks for your suggestion, but still i am facing same error.
|
![]() |
| Viewing: ASP Free Forums > Programming > ASP Development > VBScript - General - Error - Error in ODBC driver |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|