1. Alexis Colon Lugo
  2. Valentina Reports ADK
  3. Sonntag, Februar 10 2019, 05:12 PM
  4.  Abonnieren via E-Mail
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
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
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.
Kommentar
There are no comments made yet.
Alexis Colon Lugo Akzeptierte Antwort
Datasource error: "unable to open database file"
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
Please try to use different separator:
C:/QbScan/Data/BarDb.sqlite

Or escape the datasource string:
C:\\QbScan\\Data\\BarDb.sqlite
Kommentar
There are no comments made yet.
Alexis Colon Lugo Akzeptierte Antwort
same error
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
Just noticed, you included "host=" into the datasource string
The database is local, so it shouldn't be there.
Kommentar
There are no comments made yet.
Alexis Colon Lugo Akzeptierte Antwort
ok
let me try
Kommentar
There are no comments made yet.
Alexis Colon Lugo Akzeptierte Antwort
ok
thanks
that was the problems

now it works
Kommentar
There are no comments made yet.
  • Seite :
  • 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. 0 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories
Omegabundle
  1. 0 subcategories