What's new
  • Visit Rebornbuddy
  • Visit Resources
  • Visit API Documentation
  • Visit Downloads
  • Visit Portal
  • Visit Panda Profiles
  • Visit LLamamMagic

Database connectivity issues...

Status
Not open for further replies.

HouMav

New Member
Joined
Oct 11, 2014
Messages
1
Reaction score
0
I am not an expert at C#, but I thought I would attempt to create a plugin for Archebuddy. I looked at the examples that many have done, and I can't seem to find one that uses an external database. So I thought I would attempt to figure it out. I got a copy of Visio Studio 2013 and created a Class Library and targeted the .NET 4.5.1 framework. I added in the references and plugged in the using statements to match ArchBuddy's.

The problem I am having is with the database calls. Specifically if I try to compile within the archebuddy compiler I get the following:

error CS0234: The type or namespace name 'TypedTableBase' does not exist in the namespace 'System.Data' (are you missing an assembly reference?)

This is what I am loading:
using System;
using System.Data;
using System.Drawing;
using System.Windows.Forms;
using System.Threading;
using System.Collections.Generic;
using System.Linq;
using ArcheBuddy.Bot.Classes;

The TypedTableBase is actually in the System.Data.Datasetextensions, but I can't seem to load it explicitly in VS2013 or the archebuddy compiler although it IS in the references list of the project in VS2013.

I DO NOT get the same error when compiling in VS2013 due to the DatasetExtensions being in the referenced list. So I went ahead and compiled in VS2013 and just moved the dll and accompanying files from the bin directory of VS2013 to the archebuddy plugin folder and just tried to run the plugin from the plugin manager. Unfortunately I get an error anytime I try to access the database:

An attempt to attach an auto-named database for file C:\Games\AB\ph.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

Keep in mind this is a local copy and there should be no issues with accessing this file. I suspect this is due to the plugin not having access to the Datasetextensions as mentioned above.

Can anyone point me in the right direction or some ideas to try?

Thanks in advance!
 
Instead of copying your project DLL to Archebuddy/Plugins, right click on your Project, select Properties, select Build, see "Output path:" and browse to your Archebuddy/Plugins/XXX folder. It should build everything it needs directly into that directory.

Double check you've opened file writing permission to the folder you are trying to write to.
 
Status
Not open for further replies.
Back
Top