473,385 Members | 1,753 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

problem in DLL calling

Hi,

I am trying to create an eventlog DLL which uses vistaDB but I have a
problem calling it.. can you please help...
the DLL:

using System;

using VistaDB;

namespace eventlogDLL

{

/// <summary>

/// Summary description for Class1.

/// </summary>

public class eventlog

{

public eventlog()

{

//

// TODO: Add constructor logic here

//

}

public void addlog(string log_app, string log_description, string
log_user, string log_ip, string log_os, string log_computer)

{

// Database;

VistaDBDatabase logDatabase = new VistaDBDatabase();

VistaDBTable logTable = new VistaDBTable();

// Database File;

// string strDatabase =
Path.GetDirectoryName(Application.ExecutablePath) +
"\\Database\\eventlog.vdb";

string strDatabase = "C:\\Documents and Settings\\Jassim Rahma\\My
Documents\\Visual Studio Projects\\Ezi-Work\\Database\\eventlog.vdb";

// connect to database;

logDatabase.DatabaseName = strDatabase;

logDatabase.Cypher = CypherType.Blowfish;

logDatabase.Password = "17218881";

logDatabase.Parameters = 0;

logDatabase.Exclusive = true;

logDatabase.Connect();

// open proposal age tables;

logTable.Database = logDatabase;

logTable.TableName = "EVENT_LOG";

logTable.Open();

// add new eventlog;

logTable.Insert();

logTable.PutString("EZI_NAME", log_app);

logTable.PutMemo("HIGHEST_SUM_INSURED", log_description);

logTable.PutString("EZI_REMARKS", log_user);

logTable.PutString("CREATED_BY_USER", log_ip);

logTable.PutString("CREATED_BY_USER", log_os);

logTable.PutString("CREATED_BY_COMPUTER", log_computer);

logTable.PutDateTime("CREATED_BY_DATE", DateTime.Now);

logTable.Post();
//Close table

logTable.Close();

//Close database

logDatabase.Close();

}

}

}

and calling it:

using eventlogDLL;

eventlog EventLog = new eventlog();

eventlog.addlog("Ezi-Life", "New Ezi-Life Record was added", "jrahma",
"192.168.250.11", "Windows XP", "JASIM");

Many Thanks,
Jassim Rahma

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #1
5 1386
Jassim Rahma wrote:
I am trying to create an eventlog DLL which uses vistaDB but I have a
problem calling it.. can you please help...


What is the problem?

Nov 17 '05 #2
actually that's my question... I have created the DLL and trying to call
it.. what's wrong with my code?
it seems that this line is not recognized:

using eventlogDLL;

eventlog.addlog("Ezi-Life", "New Ezi-Life Record was added", "jrahma",
"192.168.250.11", "Windows XP", "JASIM");

Many Thanks,
Jassim Rahma

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #3
apm
Did you know that a "reference" has to be made to the dll?

"Jassim Rahma" <jr****@hotmail.com> wrote in message
news:uS**************@TK2MSFTNGP12.phx.gbl...
actually that's my question... I have created the DLL and trying to call
it.. what's wrong with my code?
it seems that this line is not recognized:

using eventlogDLL;

eventlog.addlog("Ezi-Life", "New Ezi-Life Record was added", "jrahma",
"192.168.250.11", "Windows XP", "JASIM");

Many Thanks,
Jassim Rahma

*** Sent via Developersdex http://www.developersdex.com ***

Nov 17 '05 #4

I have already added a reference to the DLL using

Project->Add Reference.

Many Thanks,
Jassim Rahma

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #5
Jassim Rahma wrote:
it seems that this line is not recognized:

using eventlogDLL;


What is the error message you are getting? Have you compiled the .dll?
Is the .dll project part of your solution? Have you tried a project
reference?

Nov 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Omer van Kloeten | last post by:
The Top Level Design: The class Base is a factory class with a twist. It uses the Assembly/Type classes to extract all types that inherit from it and add them to the list of types that inherit...
117
by: Peter Olcott | last post by:
www.halting-problem.com
0
by: monika.saxena | last post by:
Hi all, In one of my projects which is a web based application in asp.net, a third party tool - "Frontline Solver DLL" (It is an unmanaged DLL and ..NET is calling it using the PInvoke) is used....
7
by: Andrew Christiansen | last post by:
Hey everyone. I have Visual Basic .NET 2003 and am trying to show images on a treeview control. I have the imagelist on the form filled with images, and have the ImageList property of the...
6
by: TPJ | last post by:
Help me please, because I really don't get it. I think it's some stupid mistake I make, but I just can't find it. I have been thinking about it for three days so far and I still haven't found any...
1
by: Thomee Wright | last post by:
I'm having a problem with a pair of applications I'm developing. I have a server application which interacts with several instruments, and a client app which connects to the server and provides a...
3
by: bilosta | last post by:
Hello to everybody I'm new in win apllications and C#. I have a problem with Threading. Here is my problem: I have a form with button named: BupisiStudente, when I click on it a call next...
1
by: gzannd | last post by:
I have a problem with submitting a form to a PHP page through a dynamically created IFRAME in IE7. This code works fine in Firefox. However, IE7 submits an empty form--the correct PHP page is...
3
by: ShambhuHubli | last post by:
Hi all!! .. I am New member to this group. And also new to C/PYTHON API coding. I am trying to have two way communication i,e i am calling from python to C and then from C to python. I have no...
47
by: mukeshrasm | last post by:
Hi I am calling two pages using Ajax Get_Pages.php and Get_Content.php from combo box. Both pages are displayed based on selection from combo box. Main problem is that it is not showing the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.