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:
static class Program
static void Main()
PasSDK.PastelPartnerSDK myPasSDK = new PastelPartnerSDK();
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.
Replies are closed for this discussion.
No Sage savvy individuals willing to assist? Support is ignoring our emails. "48 hour" responses becoming more of a "48 day" responses.
Support finally assisted us. The problem was that they provided us with a version 14 serial and key instead of a version 17 one.