读书人

Delphi用一外部Dll的?解决办

发布时间: 2012-03-06 20:47:55 作者: rapoo

Delphi用一外部Dll的?
如!Delphi用一外部Dll,只有一Dll文件和Dll的一段明!
高手,看看如何用DLL?分不可加!!!

Dll文件名:dbx32sql.dll
Dll文件明如下:

To use this you have one of two constructors to use. Please see example execution below.

string dbName = "Temp_zcgl ";

string serverName = "172.20.1.107 ";.

string username = "shopfloor ";

string userpwd = "shopfloor ";
/// Using the standard constructor and inputing all information
/// From the constructor. This will automatically instantiate the setConnection Member
private dbx32sql.Connect conn = new dbx32sql.Connect(dbName, serverName, username, userpwd);

/// Using the non standard constructor with no inputs. Must initiate setConnection;

private dbx32sql.Connect conn = new dbx32sql.Connect();
conn.Database = dbName;
conn.Server = serverName;
conn.username = username;
conn.userpwd = userpwd;
conn.setConnection;


try
{
if (conn.Open)
{
string sqlGet = "SELECT COUNT (ID) FROM authors ";
SqlCommand cmdGet = new SqlCommand(sqlGet, conn.Connection);
int Count = (int)cmdGet.ExecuteScalar();
CmdGet.Dispose();
}
else
{
// Input your error handling here;
}
}
catch(Exception ex)
{
//insert other error handling.
}
finally
{
conn.Close();
}

高手,看看如何用DLL?分不可加!!!


[解决办法]
接口的名字参数都没哦~~
[解决办法]
例子用的是Java吗?
函数接口声明在什么地方?找到那个先!

读书人网 >.NET

热点推荐