DllNotFoundException: gda-2 - PullRequest
       0

DllNotFoundException: gda-2

0 голосов
/ 12 октября 2018

Я пытаюсь подключить свою программу к базе данных Oracle, когда я пытаюсь запустить программу, у меня возникает следующая ошибка: (DillNotFoundException: gda-2 System.Data.OleDbConnection.Open ()) Строка, которая вызывает ошибку con.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;


        }

    }
}

1 Ответ

0 голосов
/ 12 октября 2018

Вы должны поместить этот DLL-файл, который отсутствует в этом месте:

[UNITY_INSTALL_DIR]\Editor\Data\MonoBleedingEdge\lib\mono\4.6-api\DLL_HERE
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...