//internal string ConnectionString; /// <summary> /// Opens and manages its own connection to the Oyster Database /// ALL Instances of the Functions Class use the same Connection /// Always returns True /// </summary> /// public RemoteFunctions() { // // TODO: Add constructor logic here // try { Microsoft.Win32.RegistryKey m_RegKey = Microsoft.Win32.Registry.CurrentUser.CreateSubKey( @"SOFTWARE\Carver Lab\Oyster\OysterHardDisc"); string sDrive = (string)m_RegKey.GetValue("Disc Location",""); //string DatabaseConnection = @"Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=D:\Data\RODB;Mode=Share Deny None"; if(sDrive == "") throw new Exception("Please run Oyster Disc Setup"); ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=" + sDrive + @"\Data\RODB.DAT;Mode=Read|Share Deny Read;Jet OLEDB:Database Password="";Jet OLEDB:Database Locking Mode=0;Jet OLEDB:New Database Password="";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=true;Jet OLEDB:SFP=False"; // DatabaseConnection = @"Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=D:\Data\RODB;Mode=Share Deny None;Extended Properties="";Jet OLEDB:System database="";Jet OLEDB:Registry Path="";Jet OLEDB:Database Password="";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False"; //DatabaseConnection = @"Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=D:\Data\RODB;Mode=Read|Share Deny Read;Jet OLEDB:Database Password="";Jet OLEDB:Database Locking Mode=0;Jet OLEDB:New Database Password="";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=true;Jet OLEDB:SFP=False"; m_Connections = new RemoteFunctions.RFConnection[5]; for(int i=0; i < m_Connections.GetLength(0); i++) { m_Connections[i] = new RemoteFunctions.RFConnection(new System.Data.OleDb.OleDbConnection(ConnectionString)); } } catch(Exception Err) { throw new Exception(Err.Message,Err.InnerException); } }
//internal string ConnectionString; /// <summary> /// Opens and manages its own connection to the Oyster Database /// ALL Instances of the Functions Class use the same Connection /// Always returns True /// </summary> /// public RemoteFunctions() { // // TODO: Add constructor logic here // try { RegistryKey RK; RK = Registry.LocalMachine.OpenSubKey("Software\\Carver Lab\\Oyster V2.0\\Data"); if(RK != null) { ConnectionString = Convert.ToString((object)RK.GetValue("OysterString","")); } if(ConnectionString == "") throw new Exception("ConnectionString not found"); m_Connections = new RemoteFunctions.RFConnection[5]; for (int i = 0; i < m_Connections.GetLength(0); i++) { m_Connections[i] = new RemoteFunctions.RFConnection(new System.Data.SqlClient.SqlConnection(ConnectionString)); } } catch(Exception Err) { throw new Exception(Err.Message,Err.InnerException); } }
//internal string ConnectionString; /// <summary> /// Opens and manages its own connection to the Oyster Database /// ALL Instances of the Functions Class use the same Connection /// Always returns True /// </summary> /// public RemoteFunctions() { // // TODO: Add constructor logic here // try { Logger.WriteLog("RemoteFunction: request"); RegistryKey RK; RK = CarverLab.Utility.Logger.CarverLabRegistryKey(); if(RK != null) { ConnectionString = Convert.ToString((object)RK.GetValue("OysterString","data source=localhost;initial catalog=OysterAP;persist security info=False;user id=sa;password=oiclfsp7;packet size=4096")); } if(ConnectionString == "") throw new Exception("ConnectionString not found"); m_Connections = new RemoteFunctions.RFConnection[5]; for (int i = 0; i < m_Connections.GetLength(0); i++) { m_Connections[i] = new RemoteFunctions.RFConnection(new System.Data.SqlClient.SqlConnection(ConnectionString)); } } catch(Exception Err) { throw new Exception(Err.Message,Err.InnerException); } }
//internal string ConnectionString; /// <summary> /// Opens and manages its own connection to the Oyster Database /// ALL Instances of the Functions Class use the same Connection /// Always returns True /// </summary> /// public RemoteFunctions() { // // TODO: Add constructor logic here // try { RegistryKey RK; RK = CarverLab.Utility.Registry.DefaultProductKey; if(RK != null) { ConnectionString = Convert.ToString((object)RK.GetValue("OysterString","")); } if(ConnectionString == "") throw new Exception("ConnectionString not found"); m_Connections = new RemoteFunctions.RFConnection[5]; for (int i = 0; i < m_Connections.GetLength(0); i++) { m_Connections[i] = new RemoteFunctions.RFConnection(new System.Data.SqlClient.SqlConnection(ConnectionString)); } } catch(Exception Err) { throw new Exception(Err.Message,Err.InnerException); } }