1. Alexis Colon Lugo
  2. Valentina Reports ADK
  3. Воскресенье, Февраль 10 2019, 05:12 PM
  4.  Подписаться через email
This my Code i have error #611604
what i am doing wrong

Dim RepStrConn As String
Dim mReport AS New VReport
Dim SqlStr01 As String
Dim vCounts As Integer
Dim sPath As String
Dim sFecha As New Date

DbConn.Close

sPath="C:\QbScan\Data\BarDb.sqlite"
SqlStr01=""

RepStrConn="sqlite://host=" + sPath + ""

SqlStr01="Select ItemCode,WhsCode,ScanQty,Locate,Compare From Sap_Whs "

mprojectPath = GetFolderItem( "RepCoolingWhs.vsp" )

mProject = new VProject(mprojectPath)

try
mProject.Open()
catch e as VException
dim errNumber as Integer = e.ErrorNumber
dim errString as String = e.Message

end

if mProject <> nil then
vCounts = mProject.ReportCount()
end if

try
mReport = mProject.MakeNewReport("ScanRep", RepStrConn, SqlStr01 ) <<<<<<<<< Error 611604
catch e as VException
dim errNumber as Integer = e.ErrorNumber
dim errString as String = e.Message
sPath=errString
end


if mReport <> nil then
Dim fName As String
fName="Qb_Scan"+Trim(sFecha.SQLDate) +".pdf"
dim f as folderItem=GetFolderItem( "C:\QbScan\"+fName,folderItem.PathTypeShell)
//Dim dd As Variant
//dd=f.AbsolutePath
// Create temporary file
'dim f as folderItem
'f =getSaveFolderItem( "*.pdf", "report.pdf" ) <=== Esto te permite guardar el pdf donde quieras
///

mReport.PrintToDisk( f, EVReportPrintType.kToPDF, 1 )
For v as Integer=0 to 1000

Next
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
Hello Alexis,

This is the error returned by SQLite, so it is necessary to check what does errString contain and what can be wrong with the query.
Комментарий
There are no comments made yet.
Alexis Colon Lugo Ответ принят
Datasource error: "unable to open database file"
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
Please try to use different separator:
C:/QbScan/Data/BarDb.sqlite

Or escape the datasource string:
C:\\QbScan\\Data\\BarDb.sqlite
Комментарий
There are no comments made yet.
Alexis Colon Lugo Ответ принят
same error
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
Just noticed, you included "host=" into the datasource string
The database is local, so it shouldn't be there.
Комментарий
There are no comments made yet.
Alexis Colon Lugo Ответ принят
ok
let me try
Комментарий
There are no comments made yet.
Alexis Colon Lugo Ответ принят
ok
thanks
that was the problems

now it works
Комментарий
There are no comments made yet.
  • Страница :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories