1. Beatrix Willius
  2. as SQLite DB Server
  3. 火, 8月 24 2021, 08:30 AM
  4.  メールで購読
When using SQLite DB Server should I use VSqlitePreparedStatement or SqlitePreparedStatement? A user sent me an error report where only creating an SqlitePreparedStatement could be Nil. He is using Valentina Server 10.4. I wasn't able to reproduce the behaviour with my current installation of VServer.

Then I checked my code and found - cough - that I was using both VSqlitePreparedStatement AND SqlitePreparedStatement. So which one is good? And I'm still converting my Xojo code to API 2 where I would like to have RowSets and not RecordSets.
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
Hello Beatrix,

It should not be a problem, VSqlitePreparedStatement is inherited from SqlitePreparedStatement.

DB.Prepare returns SqlitePreparedStatement and DB.PrepareEx can be used to get VSqlitePreparedStatement (just return types are different, they return the same object)
コメント
There are no comments made yet.
Beatrix Willius 承諾済みの回答
Hi Sergey,

here is my code:


'extra logging
Globals.theErrorLog.logitem(currentMethodName + " 3")

try

'prepare the prepared statement
dim PreparedForSearch as SqlitePreparedStatement = remote_db.Prepare("SELECT docid FROM bodyindex WHERE messagebody MATCH ?")
PreparedForSearch.BindType(0, SQLitePreparedStatement.SQLITE_TEXT)
SearchString = ReplaceAll(SearchString, """", """""")

'extra logging
Globals.theErrorLog.logitem(currentMethodName + " 4")
dim data as RecordSet = PreparedForSearch.SQLSelect("'*'" + searchstring + "'*'")



From the user I got back:
SQLiteIndex.FindStringRemote 3
2021-08-20 07:44:29 --------------------------
2021-08-20 07:44:29 An error happened:
2021-08-20 07:44:29 Class/Method: SQLiteIndex.FindStringRemote
2021-08-20 07:44:29 Time: Friday, August 20, 2021 7:44:29 AM Eastern Daylight Time 15847034
2021-08-20 07:44:29 Type of Error: NilObjectException


After replacing SqlitePreparedStatement with VSqlitePreparedStatement the NOE went away.
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
So SqlitePreparedStatement worked for you but NOE was generated on the user's computer, right?
That's strange and we need to reproduce it.

Is there any significant difference in Mac configurations - Intel/ARM, OS version?
コメント
There are no comments made yet.
Beatrix Willius 承諾済みの回答
No chance. Even I wasn't able to reproduce be behaviour. Users want problems solved and don't want to reproduce bugs. The guy from a few days ago who had a nicely reproducible corruption didn't get back to me either:( .

Valentina Server 10.4, macOS 10.15.7, Intel.
コメント
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