繁体   English   中英

DllNotFoundException:gda-2

[英]DllNotFoundException: gda-2

我想我的程序连接到Oracle数据库,当我尝试运行该程序,我有以下错误:(DillNotFoundException:GDA-2 System.Data.OleDbConnection.Open()),导致该错误的行是骗子.Open()我看过一些有关此错误的论坛,但仍然找不到该问题的解决方案。 有人能帮助我吗? 这是代码:

System.Collections;

using System.Collections.Generic;

using UnityEngine;

using System.Data;

using UnityEngine.UI;
using System.Text.RegularExpressions;
using System;
using System.Data.Odbc;
using System.Data.SqlClient;
using System.Data.Sql;
using Oracle.DataAccess.Client;
//using System.Data.OracleClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
//using Tutorial.SqlConn;
using Oracle.DataAccess.Types;
//using Oracle.ManagedDataAccess;
using System.Data.OleDb;
//using System.Data.UpdateRowSource;


public partial class CreateAccount : MonoBehaviour
{

    // creation of GameObject
    public GameObject username;
    public GameObject password;
    public GameObject confPassword;
    // 
    private string Username;
    private string Password;
    private string ConfPassword;

    void Start()
    {
        //RegisterButton(); 
    }

    public void RegisterButton()
    {
        /*bool UN = false;
        bool PW = false;
        bool CPW = false;*/

        if (Username != "" && Password != "")
        {




            OleDbConnection con = new OleDbConnection(@"Provider = MSDAORA;Data Source=orcl;Persist Security Info=True;User ID=hr;Password=hr;Unicode=True");
            con.Open();

            string cmdText = @"INSERT INTO PLAYER VALUES('" + username.GetComponent<InputField>().text + "','" + password.GetComponent<InputField>().text + "')";

            OleDbCommand cmd = new OleDbCommand(cmdText, con);
            cmd.ExecuteNonQuery();
            con.Close();  

        }





    }

    // Update is called once per frame

    void Update()
    {

        if (Input.GetKeyDown(KeyCode.Tab))
        {
            if (username.GetComponent<InputField>().isFocused)
            {
                password.GetComponent<InputField>().Select();
            }

            /*if (password.GetComponent<InputField>().isFocused)
            {
                confPassword.GetComponent<InputField>().Select();
             }*/

        }

        if (Input.GetKeyDown(KeyCode.Return))
        {
            if (Password != "" && Username != "")
            {
                RegisterButton();
            }

            Username = username.GetComponent<InputField>().text;
            Password = password.GetComponent<InputField>().text;
            //ConfPassword = confPassword.GetComponent<InputField>().text;


        }

    }
}

您应该将缺少的.dll文件放在以下位置:

[UNITY_INSTALL_DIR]\Editor\Data\MonoBleedingEdge\lib\mono\4.6-api\DLL_HERE

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM