File download error
invalid precision Value
unable to download the file from sqlserver 2012. please find the attachement more details
for your inforamtion this is working in alpha five v11, but in alpha fivev12 this error is coming.
x basic code for your information :-
function afterUpload as v (e as p)
dim fileCount as n
fileCount = e.filecount
dim i as n
dim fileArray as p
fileArray = e.filearray
DIM cn as sql::Connection
if cn.open("::Name::RMS-Sql") = .F. then
e.javascript = "alert('Unable to Open the Database');"
return ' unable to open database
end if
dim insertFilesql as c
insertFilesql = "insert into Cv_Sent_Attachments(Cv_Sent_Id, Embedded_File_Name, Embedded_File_Type, Embedded_File,
for i = 1 to fileCount
dim fileBinaryData as b
fileBinaryData = e.fileArray[i].data
args.add("Cv_Sent_Id",convert_type(e.primaryKeyArray[1],"N"))
args.add("Embedded_File_Name",e.fileArray[i].fileName)
dim filename as c
filename = e.fileArray[i].fileName
dim splitFileName as C
splitFileName = strtran(fileName, ".", " ")
dim fileExtension as C
fileExtension = "." + lastword(splitFileName)
args.add("Embedded_File_Type", fileExtension)
args.add("Embedded_File",fileBinaryData)
args.add("Uploaded_On",now())
args.add("Uploaded_By",SESSION.LOGGEDINUSERFULLNAME)
if cn.Execute(insertFilesql, args) = .F. then
e.javascript = "alert('" + js_escape(cn.CallResult.text) + "');"
end if
e.javascript = "alert('" + js_escape(cn.CallResult.text) + "');"
next i
cn.close()
end function
invalid precision Value
unable to download the file from sqlserver 2012. please find the attachement more details
for your inforamtion this is working in alpha five v11, but in alpha fivev12 this error is coming.
x basic code for your information :-
function afterUpload as v (e as p)
dim fileCount as n
fileCount = e.filecount
dim i as n
dim fileArray as p
fileArray = e.filearray
DIM cn as sql::Connection
if cn.open("::Name::RMS-Sql") = .F. then
e.javascript = "alert('Unable to Open the Database');"
return ' unable to open database
end if
dim insertFilesql as c
insertFilesql = "insert into Cv_Sent_Attachments(Cv_Sent_Id, Embedded_File_Name, Embedded_File_Type, Embedded_File,
Uploaded_On, Uploaded_By) values (:Cv_Sent_Id, :Embedded_File_Name, :Embedded_File_Type, :Embedded_File, :Uploaded_On, :Uploaded_By)"
dim args as sql::argumentsfor i = 1 to fileCount
dim fileBinaryData as b
fileBinaryData = e.fileArray[i].data
args.add("Cv_Sent_Id",convert_type(e.primaryKeyArray[1],"N"))
args.add("Embedded_File_Name",e.fileArray[i].fileName)
dim filename as c
filename = e.fileArray[i].fileName
dim splitFileName as C
splitFileName = strtran(fileName, ".", " ")
dim fileExtension as C
fileExtension = "." + lastword(splitFileName)
args.add("Embedded_File_Type", fileExtension)
args.add("Embedded_File",fileBinaryData)
args.add("Uploaded_On",now())
args.add("Uploaded_By",SESSION.LOGGEDINUSERFULLNAME)
if cn.Execute(insertFilesql, args) = .F. then
e.javascript = "alert('" + js_escape(cn.CallResult.text) + "');"
end if
e.javascript = "alert('" + js_escape(cn.CallResult.text) + "');"
next i
cn.close()
end function