Pastel Partner SDK C# application cannot find Database in Datapath

Hello,

TL;DR: File exists in directory, return code for GetNearest() says file cannot be found. Any suggestions?

We have been struggling to get our C# application to connect to the pastel database. I am working from a pc connected to the network, trying to access the database from my computer running a C# app in Visual Studio. Below is my code:

namespace EpicTest
{
static class Program
{


static void Main()
{

PasSDK.PastelPartnerSDK myPasSDK = new PastelPartnerSDK();
myPasSDK.SetLicense("OurAccount", "Acckey");

string rtnString = myPasSDK.SetDataPath("P:\\SALES2018");

Console.WriteLine("DataPath Return: " + rtnString); // Returns: nothing
string recString = myPasSDK.GetNearest("ACCHISTL", 1, "0"); // Will throw a "Object Required" exception if there is no file that is given as a paramter, but will return "1|" if the file does exist but it cant find the file(?)
Console.WriteLine("GetNearest Return: " + recString); // Returns: 1 | ACCMASD

}
}
}

So as you can see in my comments, setting the data path will return a void string. When i try to do a GetNearest() call, it will "throw a "Object Required" exception if there is no file with that name in the directory, but will return "1|ACCHISTL" if the file does exist but it cant find the file(? So the SDK documentation explains that the "1|" means the file cant be found).

However i can access the server (pastel database location mapped to P: drive) and i can physically see that the database files are in that directory. I see the .DDFs and everything, plus a bunch of .DAT files.

Views: 61

Replies are closed for this discussion.

Replies to This Discussion

Bump.

Bump.

Bump-erino.

bumpidy-bump.

No Sage savvy individuals willing to assist? Support is ignoring our emails. "48 hour" responses becoming more of a "48 day" responses.

[Thread Closed]

Support finally assisted us. The problem was that they provided us with a version 14 serial and key instead of a version 17 one.

RSS

The Sage Intelligence Blog

Like Sage Intelligence?

Follow @SageSupport

© 2017   Created by Sage Alchemex.   Powered by

Badges  |  Report an Issue  |  Terms of Service