【发布时间】:2014-03-11 05:56:10
【问题描述】:
您好,我正在使用 3 层架构在 vb.net 中创建应用程序。
我的数据库连接是:
Implements IDisposable
Public Shared ReadOnly mcpConnectionString As String = System.Configuration.ConfigurationManager.ConnectionStrings("con1").ConnectionString
Private _McpConnection As OracleConnection
业务层是:
Public Class blayer
Inherits DBConnection
Public Sub ses_test_insert(ByVal p_userid As Integer, ByVal p_username As String, ByVal p_createdby As String, ByVal p_date As String)
SqlHelper.ExecuteNonQuery(mcpConnectionString, "insertDBUSER", p_userid, p_username, p_createdby, p_date)
End Sub
在网络配置中:
<add name="con1" connectionString="Data Source=xe;User ID=system;Password=sesu;Unicode=True" providerName="System.Data.OracleClient" />
我使用 Oracle 作为后端工具。我在oracle insertDBUSER中创建了Procedure ....
我无法将数据插入表中。当我单击插入按钮时,它会显示
Exception Details: System.ArgumentException: Keyword not supported: 'unicode'.
Source Error:
Line 12: Inherits DBConnection
Line 13: Public Sub ses_test_insert(ByVal p_userid As Integer, ByVal p_username As String, ByVal p_createdby As String, ByVal p_date As String)
Line 14: SqlHelper.ExecuteNonQuery(mcpConnectionString, "insertDBUSER", p_userid, p_username, p_createdby, p_date)
Line 15: End Sub
Line 16: End Class
有什么问题吗?
删除 unicode 后显示:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
【问题讨论】:
标签: asp.net vb.net c#-4.0 visual-studio-2008 unicode