首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >DllNotFoundException: gda-2

DllNotFoundException: gda-2
EN

Stack Overflow用户
提问于 2018-10-12 14:23:54
回答 1查看 95关注 0票数 0

当我试图运行该程序时,我试图将我的程序连接到Oracle,我有以下错误:(DillNotFoundException: gda-2 System.Data.OleDbConnection.Open())导致错误的行在con.Open()上--我在一些论坛上查看了这个错误,但仍然找不到解决这个问题的方法。有人能帮帮我吗?以下是代码:

代码语言:javascript
复制
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;


        }

    }
}
EN

回答 1

Stack Overflow用户

发布于 2018-10-12 14:32:24

您应该将丢失的.dll文件放在这个位置:

代码语言:javascript
复制
[UNITY_INSTALL_DIR]\Editor\Data\MonoBleedingEdge\lib\mono\4.6-api\DLL_HERE
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52781601

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档