Code Monkey home page Code Monkey logo

Comments (6)

govert avatar govert commented on September 16, 2024

I'm not sure what you're asking.
All your functions are returning 0, which means OK...
The demo routine tries to create a file in a temp directory, maybe that fails?

from sqliteforexcel.

Steviey avatar Steviey commented on September 16, 2024

Does the connection to Sqlite3.dll depend on any firewall settings?
Are there any security - options to switch in Excel?
By the way, I modified the path to a location that makes sense and commented out the kill statement.
TestFile = ThisWorkbook.Path + "\x64\TestSqlite3ForExcel.db3"
I also get run time error 53.

from sqliteforexcel.

govert avatar govert commented on September 16, 2024

No, the Sqlite3.dll is juat a library file that is read into the Excel process. There is not network stuff involved at all.
I don't know of any security options that affect these modules.
Error 53 means file not found. At which line to you get this?
You say your file access fails, but all your calls returned 0, meaning OK. So I don't really know where you are stuck.
Good luck...!

from sqliteforexcel.

pts925 avatar pts925 commented on September 16, 2024

Hi Govert, Any reason the exec statement is not included? I have a VBA program that updates many entries based on calculated values within excel, and calling Update many times through prepare, step, finalize is extremely slow, wondering if grouping into one "exec" command would be significantly faster.
Any advice is much appreciated!
Thanks,
Tom

from sqliteforexcel.

govert avatar govert commented on September 16, 2024

@pts925 From the documentation for sqlite_exec:

The sqlite3_exec() interface is a convenience wrapper around sqlite3_prepare_v2(), sqlite3_step(), and sqlite3_finalize(), that allows an application to run multiple statements of SQL without having to use a lot of C code.

It's tricky to implement in VBA if we're to support the callback function, and I doubt it would make much difference to the performance. You can do the same with regular API calls, and those will be extremely fast anyway. And performance bottlenecks you have in doing updates are due to the database, not the C API calls.

For better insert or update performance you should use transactions - these are called as regular statements.

from sqliteforexcel.

pts925 avatar pts925 commented on September 16, 2024

Wow, using a transaction much much better (clearly I am a novice). Thanks so much for your help!

from sqliteforexcel.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.