#1  
Old 23rd November 2018, 12:39 PM
denisprince denisprince is offline
Junior Member
 
Join Date: Aug 2011
Posts: 12
Default NexusDB.AdoProvider V4.0.30319 and DLL

Hi,

I need to connect to NexusDB from inside a DLL written in C#.

Here is the code I've been using in a WindowsFormApplication for a while:

WindowFormApplication:
....
....
using NexusDB.ADOProvider;

namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
NxConnection connection = default(NxConnection);
NxDataAdapter adapter = new NxDataAdapter();
string sql = null;

connection = new nxConnection("Server=127.0.0.1;Database=DpFmpNxDat a;Port=16000;Native=True;Embedded=False;Username=; Password=;Timeout=10000;BlockReadSize=0;NativeTran sportType=TCP/IPV4;SecureTransportKey=");
sql = "INSERT INTO WSRAMQ_LOG(USER,SERVICE,IDMACHINE,IDUTIL,LOG,Succe ss,Agence) values(6,0,'ARG16100H','','Test',true,'16100')";
connection.Open();
adapter.InsertCommand = new NxCommand(sql, connection);
adapter.InsertCommand.ExecuteNonQuery();
}
}
}

If I use this same code with the same NexusDB.ADOProvider in a class library ( DLL , UnManagedExports), I get an exception on the line:
connection.Open(); <<===

$2C0E/11278 Cannot locate or connect to network server.

Any clues?

Thank you,

Denis Prince
  #2  
Old 24th November 2018, 01:08 AM
denisprince denisprince is offline
Junior Member
 
Join Date: Aug 2011
Posts: 12
Default NexusDB.AdoProvider V4.0.30319 and DLL

It's all ok now.

It was only on the first call and while debugging the dll with a startup project from VS. When outside the debugger, everything is working fine.

Denis Prince


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
NexusDB.ADOProvider NxDataReader NotSupportedException: GetBytes atempela nexusdb.public.support.adoprovider 1 3rd February 2018 11:48 PM
ADOProvider 280 issue JimGilmour nexusdb.public.support.adoprovider 13 25th October 2016 10:02 AM
AV in ADOProvider 242 boman nexusdb.public.support.adoprovider 9 22nd June 2016 08:06 PM
ADOProvider V2 w/VS2005 support Ole Willy Tuv nexusdb.public.support.adoprovider 25 11th April 2007 02:30 AM
Unable to load DLL (NexusDB.ADOProvider.NexusDBV1.dll) G. Campbell nexusdb.public.support 5 20th May 2005 01:19 PM


All times are GMT +11. The time now is 11:41 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.