C# CDB Interface Examples

Hi all,

I am trying to understand how C# interface with CDB works. Since I am not an expert in programming, I tried to use provided examples in C# folder.

The problem is that when I build the solution and try to start the .exe file I get an error message as shown below.

The only thing that I have changed in the code is to add the path to my cdb file

Does someone had a similar issue or am I missing some step
Thanks a lot for the help

C# isn’t my strong suite but try:

  • Run the program w/o opening a cdb
    I.e. see if you can load all the database commands (just comment out actually using them)
    If this works, you actually have a problem opening the file, not accessing the commands.
  • Put the cdb in the current working folder of your program and skip the entire path
  • Using a regular string instead of a verbatim (skip the @ and use escapes for the slashes \\) like the examples.

ok, after a bit I found the reason, Visual Studio was building application as 32 bit and it has to be set as 64 bit

1 Like