VS2008 How to connect to Jade6.3 Database?
Posted: Fri Aug 07, 2009 1:28 pm
by Didier >> Tue, 5 May 2009 7:23:15 GMT
Hi,
My Jade is Unicode 6.3.03.
For .net( VS2008 ) Connecting to Jade. code as following ========================================================================== using System;
using JadeWorld.Jade.Interop;
namespace WebApplication1
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
JadeConnectionParams jcp = new JadeConnectionParams(
@"E:\Hanyitong_unicode\system",
@"E:\Hanyitong_unicode\system\jade.ini",
JadeDBConnection.ConnectionType.SingleUser,
@"JadeSchema",
@"Jade",
@"Administrator",
@"",
1
);
using (JadeDBConnection connection = new JadeDBConnection(jcp)) {
using (JadeDBProcess process = connection.GetProcess())
{
//trx code here
}
}
}
}
} ==========================================================================
Got Exception As Following:
========================================================================== Server Error in '/' Application. --------------------------------------------------------------------------------
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Source Error:
Line 19: );
Line 20:
Line 21: using (JadeDBConnection connection = new JadeDBConnection(jcp))
Line 22: {
Line 23: using (JadeDBProcess process = connection.GetProcess())
Source File: E:\Hanyitong_unicode\netWeb\netWebApp\WebApplication1\Default.aspx.cs Line: 21
Stack Trace:
[AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.]
JadeWorld.Jade.Interop.JadeNode.jomInitialize(DskHandle& nodeHandle, IntPtr subDir, IntPtr serverName, IntPtr iniFile) +0
JadeWorld.Jade.Interop.JadeNode.JadeInitialize(JadeConnectionParams connectionParams) +326
JadeWorld.Jade.Interop.JadeDBConnection.InitializeNode() +222
JadeWorld.Jade.Interop.JadeDBConnection..ctor(JadeConnectionParams connectionParams) +69
WebApplication1._Default.Page_Load(Object sender, EventArgs e) in E:\Hanyitong_unicode\netWeb\netWebApp\WebApplication1\Default.aspx.cs:21
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +33
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433 ========================================================================== How to fix the Error ?
Appreciate for any help.
Didier
2009.05.05
Hi,
My Jade is Unicode 6.3.03.
For .net( VS2008 ) Connecting to Jade. code as following ========================================================================== using System;
using JadeWorld.Jade.Interop;
namespace WebApplication1
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
JadeConnectionParams jcp = new JadeConnectionParams(
@"E:\Hanyitong_unicode\system",
@"E:\Hanyitong_unicode\system\jade.ini",
JadeDBConnection.ConnectionType.SingleUser,
@"JadeSchema",
@"Jade",
@"Administrator",
@"",
1
);
using (JadeDBConnection connection = new JadeDBConnection(jcp)) {
using (JadeDBProcess process = connection.GetProcess())
{
//trx code here
}
}
}
}
} ==========================================================================
Got Exception As Following:
========================================================================== Server Error in '/' Application. --------------------------------------------------------------------------------
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Source Error:
Line 19: );
Line 20:
Line 21: using (JadeDBConnection connection = new JadeDBConnection(jcp))
Line 22: {
Line 23: using (JadeDBProcess process = connection.GetProcess())
Source File: E:\Hanyitong_unicode\netWeb\netWebApp\WebApplication1\Default.aspx.cs Line: 21
Stack Trace:
[AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.]
JadeWorld.Jade.Interop.JadeNode.jomInitialize(DskHandle& nodeHandle, IntPtr subDir, IntPtr serverName, IntPtr iniFile) +0
JadeWorld.Jade.Interop.JadeNode.JadeInitialize(JadeConnectionParams connectionParams) +326
JadeWorld.Jade.Interop.JadeDBConnection.InitializeNode() +222
JadeWorld.Jade.Interop.JadeDBConnection..ctor(JadeConnectionParams connectionParams) +69
WebApplication1._Default.Page_Load(Object sender, EventArgs e) in E:\Hanyitong_unicode\netWeb\netWebApp\WebApplication1\Default.aspx.cs:21
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +33
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433 ========================================================================== How to fix the Error ?
Appreciate for any help.
Didier
2009.05.05