Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums VEGAS Pro Vegas C# script connecting to database in W7 64-bit

  • Vegas C# script connecting to database in W7 64-bit

    Posted by Dirk Mitchell on June 21, 2011 at 11:59 am

    I have a small C# script which uses an MS-Access database to fill comments into the Project Media tab. It’s basically a script from John Rofrano that I found somewhere and tweaked it for my own use. Worked great in Vegas 9 on XP 32-bit. Now I’m finding out that Windows 7 64-bit does not have the drivers to access Jet databases, so the following line in Vegas 9 64-bit:

    string source = “Provider=Microsoft.JET.OLEDB.4.0; Data Source=C:\Users\dwm\My Documents\dwm\capture\tapelog.mdb”;

    produces the following error:

    “The ‘Microsoft.JET.OLEDB.4.0’ provider is not registered on the local machine.”

    The same thing happens if I use the ACE provider which is documented on the web as an alternative. It boils down to the lack of a 64-bit driver to access “Access.” Just another addition to the list of “What I don’t like about Windows 7.”

    I’m just starting to look a SQL Server Express, but know absolutely nothing about it. I should be able to export my Access database into anything since it’s just one table at this point. But I want to stay in the Microsoft area since I have another program (not Vegas-related) that I’ll have to port from VB6 to VB.net to work with Windows 7 (just when you figure out how to use something effectively, they change it on you.)

    So which direction should I look to use a database in C# script in Vegas?

    Dirk Mitchell replied 14 years, 2 months ago 3 Members · 4 Replies
  • 4 Replies
  • Gordon Currie

    June 23, 2011 at 5:19 am

    You did change your provider string to “Microsoft.ACE.OLEDB.12.0” ?

    You might consider SQLite. It is a single file database that runs well locally. It’s easy to connect from .NET apps.

  • Dirk Mitchell

    June 23, 2011 at 8:57 pm

    Yes, I did try that per more instructions found on the web. I installed the ACE driver, but it did not work. From what I could glean from the information, it appears that there are no 64-bit OLEDB providers. Not sure if I stated that correctly. Everything that I read to fix it was geared toward compiling in an x86 mode (like they’re creating programs with Visual Studio .NET.) Since I’m just running a script through Vegas, I don’t think I have that option. Talk about backwards compatibility.

    It seems like it should be a simple thing, but I just haven’t found it yet.

  • Richard Algor

    May 29, 2012 at 7:17 pm

    Here is a sample oledb connection code

    string connetionString = null;
    OleDbConnection cnn ;
    connetionString = “Provider=Microsoft.Jet.OLEDB.4.0;Data Source=yourdatabasename.mdb;”;
    cnn = new OleDbConnection(connetionString);
    try
    {
    cnn.Open();
    MessageBox.Show (“Connection Open ! “);
    cnn.Close();
    }
    catch (Exception ex)
    {
    MessageBox.Show(“Can not open connection ! “);
    }

    try https://vb.net-informations.com/ado.net-dataproviders/ado.net-dataproviders-tutorial.htm , you can see different types of connections in c#

    richard.

  • Dirk Mitchell

    May 31, 2012 at 3:47 pm

    Since it’s been awhile since I’ve visited this problem, I thought I would take a couple of minutes to see if I could get it to work. My problem now is that I get the following message trying to load any script that tries to connect to a database:

    “The type or namespace name ‘Data’ does not exist in the namespace ‘System’ (are you missing an assembly reference?)”

    How is it that I can do this with XP and Vegas 9.0 32-bit, but not Win 7 and Vegas 9 64-bit? Where is System.Data anyway? Is there a library I need? All of my .NET frameworks installed are 4, nothing lower.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy