Commit for development environment setup
This commit is contained in:
BIN
PROMS/ReferencedObjectsOld/Exe/RefObj/ParadoxConversion/App.ico
Normal file
BIN
PROMS/ReferencedObjectsOld/Exe/RefObj/ParadoxConversion/App.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,55 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
//
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
//
|
||||
[assembly: AssemblyTitle("")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
//
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.1.*")]
|
||||
|
||||
//
|
||||
// In order to sign your assembly you must specify a key to use. Refer to the
|
||||
// Microsoft .NET Framework documentation for more information on assembly signing.
|
||||
//
|
||||
// Use the attributes below to control which key is used for signing.
|
||||
//
|
||||
// Notes:
|
||||
// (*) If no key is specified, the assembly is not signed.
|
||||
// (*) KeyName refers to a key that has been installed in the Crypto Service
|
||||
// Provider (CSP) on your machine. KeyFile refers to a file which contains
|
||||
// a key.
|
||||
// (*) If the KeyFile and the KeyName values are both specified, the
|
||||
// following processing occurs:
|
||||
// (1) If the KeyName can be found in the CSP, that key is used.
|
||||
// (2) If the KeyName does not exist and the KeyFile does exist, the key
|
||||
// in the KeyFile is installed into the CSP and used.
|
||||
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
|
||||
// When specifying the KeyFile, the location of the KeyFile should be
|
||||
// relative to the project output directory which is
|
||||
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
|
||||
// located in the project directory, you would specify the AssemblyKeyFile
|
||||
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
|
||||
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
|
||||
// documentation for more information on this.
|
||||
//
|
@@ -0,0 +1,58 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
//
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
//
|
||||
[assembly: AssemblyTitle("")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
//
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.1.*")]
|
||||
|
||||
//
|
||||
// In order to sign your assembly you must specify a key to use. Refer to the
|
||||
// Microsoft .NET Framework documentation for more information on assembly signing.
|
||||
//
|
||||
// Use the attributes below to control which key is used for signing.
|
||||
//
|
||||
// Notes:
|
||||
// (*) If no key is specified, the assembly is not signed.
|
||||
// (*) KeyName refers to a key that has been installed in the Crypto Service
|
||||
// Provider (CSP) on your machine. KeyFile refers to a file which contains
|
||||
// a key.
|
||||
// (*) If the KeyFile and the KeyName values are both specified, the
|
||||
// following processing occurs:
|
||||
// (1) If the KeyName can be found in the CSP, that key is used.
|
||||
// (2) If the KeyName does not exist and the KeyFile does exist, the key
|
||||
// in the KeyFile is installed into the CSP and used.
|
||||
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
|
||||
// When specifying the KeyFile, the location of the KeyFile should be
|
||||
// relative to the project output directory which is
|
||||
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
|
||||
// located in the project directory, you would specify the AssemblyKeyFile
|
||||
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
|
||||
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
|
||||
// documentation for more information on this.
|
||||
//
|
||||
[assembly: AssemblyDelaySign(false)]
|
||||
[assembly: AssemblyKeyFile("E:\\proms.net\\Public Key\\vlnkey.snk")]
|
||||
[assembly: AssemblyKeyName("")]
|
File diff suppressed because it is too large
Load Diff
351
PROMS/ReferencedObjectsOld/Exe/RefObj/ParadoxConversion/Form1.cs
Normal file
351
PROMS/ReferencedObjectsOld/Exe/RefObj/ParadoxConversion/Form1.cs
Normal file
@@ -0,0 +1,351 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2002 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: Form1.cs $ $Revision: 7 $
|
||||
* $Author: Jsj $ $Date: 1/06/03 12:53p $
|
||||
*
|
||||
* $History: Form1.cs $
|
||||
*
|
||||
* ***************** Version 7 *****************
|
||||
* User: Jsj Date: 1/06/03 Time: 12:53p
|
||||
* Updated in $/EXE/RefObj/ParadoxConversion
|
||||
* cleanup
|
||||
*
|
||||
* ***************** Version 6 *****************
|
||||
* User: Jsj Date: 1/06/03 Time: 11:35a
|
||||
* Updated in $/EXE/RefObj/ParadoxConversion
|
||||
* When called from the RO Editor, hide the Find RO Directory button
|
||||
*
|
||||
* ***************** Version 5 *****************
|
||||
* User: Jsj Date: 12/18/02 Time: 12:47p
|
||||
* Updated in $/EXE/RefObj/ParadoxConversion
|
||||
* new icons
|
||||
*
|
||||
* ***************** Version 4 *****************
|
||||
* User: Jsj Date: 12/06/02 Time: 3:21p
|
||||
* Updated in $/EXE/RefObj/ParadoxConversion
|
||||
* added command line argument (DEBUG) to turn on writing debug message to
|
||||
* a file
|
||||
*
|
||||
* ***************** Version 3 *****************
|
||||
* User: Jsj Date: 10/04/02 Time: 2:02p
|
||||
* Updated in $/EXE/RefObj/ParadoxConversion
|
||||
* added better user interface
|
||||
*
|
||||
* ***************** Version 2 *****************
|
||||
* User: Jsj Date: 9/25/02 Time: 10:19a
|
||||
* Updated in $/EXE/RefObj/ParadoxConversion
|
||||
* added header
|
||||
*********************************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
|
||||
namespace ParadoxConversion
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for Form1.
|
||||
/// </summary>
|
||||
public class Form1 : System.Windows.Forms.Form
|
||||
{
|
||||
bool DidConvert = false;
|
||||
bool ShowBtnFndRO = true;
|
||||
public Form MainForm;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.Label StatWindow;
|
||||
private string PassedInDirPath;
|
||||
private System.Windows.Forms.Button btnFndRO;
|
||||
private System.Windows.Forms.Button btnExit;
|
||||
private bool DoDebugFile;
|
||||
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.Container components = null;
|
||||
|
||||
public void StatusWindow(String Message1,String Message2, String Message3)
|
||||
{
|
||||
StatWindow.Text = Message1 + Message2 + Message3;
|
||||
}
|
||||
|
||||
public Form1(string Connpath, bool doingDebug)
|
||||
{
|
||||
//
|
||||
// Required for Windows Form Designer support
|
||||
//
|
||||
// Icon = new Icon(typeof(Form1),"V.ico");
|
||||
InitializeComponent();
|
||||
PassedInDirPath = Connpath;
|
||||
if (!Connpath.Equals(""))
|
||||
ShowBtnFndRO = false;
|
||||
DoDebugFile = doingDebug;
|
||||
|
||||
//
|
||||
// TODO: Add any constructor code after InitializeComponent call
|
||||
//
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
protected override void Dispose( bool disposing )
|
||||
{
|
||||
if( disposing )
|
||||
{
|
||||
if (components != null)
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
}
|
||||
base.Dispose( disposing );
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.StatWindow = new System.Windows.Forms.Label();
|
||||
this.btnFndRO = new System.Windows.Forms.Button();
|
||||
this.btnExit = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Font = new System.Drawing.Font("Tahoma", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
|
||||
this.button1.Location = new System.Drawing.Point(176, 152);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(80, 40);
|
||||
this.button1.TabIndex = 0;
|
||||
this.button1.Text = "Convert";
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// StatWindow
|
||||
//
|
||||
this.StatWindow.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.StatWindow.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
|
||||
this.StatWindow.Location = new System.Drawing.Point(8, 16);
|
||||
this.StatWindow.Name = "StatWindow";
|
||||
this.StatWindow.Size = new System.Drawing.Size(368, 112);
|
||||
this.StatWindow.TabIndex = 1;
|
||||
this.StatWindow.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// btnFndRO
|
||||
//
|
||||
this.btnFndRO.Font = new System.Drawing.Font("Tahoma", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
|
||||
this.btnFndRO.Location = new System.Drawing.Point(8, 152);
|
||||
this.btnFndRO.Name = "btnFndRO";
|
||||
this.btnFndRO.Size = new System.Drawing.Size(152, 40);
|
||||
this.btnFndRO.TabIndex = 2;
|
||||
this.btnFndRO.Text = "Find RO Directory";
|
||||
this.btnFndRO.Click += new System.EventHandler(this.btnFndRO_Click);
|
||||
//
|
||||
// btnExit
|
||||
//
|
||||
this.btnExit.Font = new System.Drawing.Font("Tahoma", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
|
||||
this.btnExit.Location = new System.Drawing.Point(288, 152);
|
||||
this.btnExit.Name = "btnExit";
|
||||
this.btnExit.Size = new System.Drawing.Size(80, 40);
|
||||
this.btnExit.TabIndex = 3;
|
||||
this.btnExit.Text = "Exit";
|
||||
this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
|
||||
this.ClientSize = new System.Drawing.Size(384, 197);
|
||||
this.Controls.AddRange(new System.Windows.Forms.Control[] {
|
||||
this.btnExit,
|
||||
this.btnFndRO,
|
||||
this.StatWindow,
|
||||
this.button1});
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "Form1";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Referenced Object Database Conversion";
|
||||
this.Load += new System.EventHandler(this.Form1_Load);
|
||||
this.Paint += new System.Windows.Forms.PaintEventHandler(this.Form1_Paint);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
|
||||
static bool ValidateConnectionPath(string ConPath)
|
||||
{
|
||||
bool validPath = true;
|
||||
string tmpstr = "";
|
||||
|
||||
if (ConPath.Equals(""))
|
||||
validPath = false;
|
||||
else
|
||||
{
|
||||
// make sure we are in a directory named "RO"
|
||||
if (ConPath.IndexOf("\\") != -1)
|
||||
{
|
||||
tmpstr = ConPath.Substring(ConPath.LastIndexOf("\\"));
|
||||
tmpstr = tmpstr.ToUpper();
|
||||
}
|
||||
else
|
||||
tmpstr = ConPath;
|
||||
if (!tmpstr.Equals("\\RO"))
|
||||
{
|
||||
string tstr = "This is not an RO directory:\n\n" + ConPath;
|
||||
MessageBox.Show(tstr,"Error",MessageBoxButtons.OK,MessageBoxIcon.Error);
|
||||
// Application.Exit();
|
||||
validPath = false;
|
||||
}
|
||||
// make sure there is at least an ROMASTER file
|
||||
if (validPath && !File.Exists("ROMASTER.db"))
|
||||
{
|
||||
string tstr = "This RO directory is empty:" + ConPath;
|
||||
MessageBox.Show(tstr,"Error",MessageBoxButtons.OK,MessageBoxIcon.Error);
|
||||
// Application.Exit();
|
||||
validPath = false;
|
||||
}
|
||||
}
|
||||
|
||||
return validPath;
|
||||
}
|
||||
|
||||
static string GetRODirPath(string ConPath)
|
||||
{
|
||||
string rtnstr = "";
|
||||
string tmpstr = "";
|
||||
OpenFileDialog ofDlg = new OpenFileDialog();
|
||||
ofDlg.Title = "Navigate to the Referenced Objects (RO) directory";
|
||||
ofDlg.Filter = "Referenced Objects|ROMASTER.DB;|All Files|*.*";
|
||||
|
||||
if (ConPath.Equals(""))
|
||||
tmpstr = "c:\\";
|
||||
|
||||
ofDlg.CheckPathExists = true;
|
||||
ofDlg.FileName = "ROMASTER.DB";
|
||||
ofDlg.InitialDirectory = tmpstr;
|
||||
|
||||
if (ofDlg.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
tmpstr = ofDlg.FileName;
|
||||
rtnstr = Path.GetDirectoryName(tmpstr);
|
||||
}
|
||||
else
|
||||
{
|
||||
string tstr = "Cannot convert Referenced Objects data.\n\nInvalid RO directory:\n\n" + ConPath;
|
||||
MessageBox.Show(tstr,"Error",MessageBoxButtons.OK,MessageBoxIcon.Error);
|
||||
rtnstr = null;
|
||||
}
|
||||
return rtnstr;
|
||||
}
|
||||
|
||||
[STAThread]
|
||||
static void Main(string[] args)
|
||||
{
|
||||
string ConnectionPath = "";
|
||||
bool DebugFile = false;
|
||||
// if an RO directory path was passed in, then change the
|
||||
// current working directory to it.
|
||||
// this path will also be used to generate a connection string
|
||||
// to the Access database.
|
||||
if (args.Length > 0)
|
||||
{
|
||||
string tmpstr;
|
||||
for (int i = 0; i<args.Length; i++)
|
||||
{
|
||||
tmpstr = args[0];
|
||||
if (tmpstr.Equals("DEBUG"))
|
||||
DebugFile = true;
|
||||
else
|
||||
{
|
||||
ConnectionPath = tmpstr;
|
||||
Directory.SetCurrentDirectory(ConnectionPath);
|
||||
ConnectionPath = Directory.GetCurrentDirectory();
|
||||
}
|
||||
}
|
||||
}
|
||||
Form MainForm = new Form1(ConnectionPath,DebugFile);
|
||||
Application.Run(MainForm);
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
if (!DidConvert)
|
||||
{
|
||||
StatWindow.Text = "";
|
||||
ConvertParadoxROs CvrtROs = new ConvertParadoxROs(StatWindow,DoDebugFile);
|
||||
CvrtROs.ConvertParadoxRODb(PassedInDirPath);
|
||||
StatWindow.Text = " *** Conversion Complete ****";
|
||||
DidConvert = true;
|
||||
button1.Enabled = false;
|
||||
this.Refresh();
|
||||
}
|
||||
else
|
||||
{
|
||||
Application.Exit();
|
||||
}
|
||||
}
|
||||
|
||||
private void Form1_Load(object sender, System.EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void btnFndRO_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
while ((PassedInDirPath != null) && !ValidateConnectionPath(PassedInDirPath))
|
||||
{
|
||||
PassedInDirPath = GetRODirPath(PassedInDirPath);
|
||||
}
|
||||
|
||||
if (PassedInDirPath == null)
|
||||
{
|
||||
Application.Exit();
|
||||
}
|
||||
DidConvert = false;
|
||||
|
||||
}
|
||||
|
||||
private void btnExit_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
Application.Exit();
|
||||
}
|
||||
|
||||
private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
|
||||
{
|
||||
string msgtxt = "";
|
||||
if (!DidConvert)
|
||||
{
|
||||
if ((PassedInDirPath == null) || !ValidateConnectionPath(PassedInDirPath))
|
||||
{
|
||||
button1.Enabled = false;
|
||||
btnFndRO.Enabled = true;
|
||||
msgtxt = "Press the Find RO Directory button to locate the Referened Objects you want to Convert.";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (PassedInDirPath != null)
|
||||
button1.Enabled = true;
|
||||
if (!ShowBtnFndRO)
|
||||
btnFndRO.Hide();
|
||||
msgtxt = "Current RO directory selected:\n\n" + PassedInDirPath;
|
||||
}
|
||||
|
||||
StatWindow.Text = msgtxt;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="$this.Name">
|
||||
<value>Form1</value>
|
||||
</data>
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAIAEBAQAAAAAAAoAQAAJgAAACAgEAAAAAAA6AIAAE4BAAAoAAAAEAAAACAAAAABAAQAAAAAAIAA
|
||||
AAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAgAAAgAAAAICAAIAAAACAAIAAgIAAAICAgADAwMAAAAD/AAD/
|
||||
AAAA//8A/wAAAP8A/wD//wAA////AAAAAJmQAAAAAAAAAAAAAAAAAAB3cAAAAAAAAHdwAAAAAAAAd3AA
|
||||
AAAAAAd3dwAAAAAAd3d3cAAAAAd3d3d3AAAAd3d3d3dwAAAAAAAAAAAAAIeBERGHgAAAAAEREQAAAAAA
|
||||
ARERAAAAAAABEREAAAAAAAEREQAAAAAAARERAAAA/H8AAPg/AAD4PwAA+D8AAPg/AADwHwAA4A8AAMAH
|
||||
AACAAwAAAAEAAIADAADABwAA+D8AAPg/AAD4PwAA+D8AACgAAAAgAAAAQAAAAAEABAAAAAAAAAIAAAAA
|
||||
AAAAAAAAEAAAABAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD/
|
||||
/wD/AAAA/wD/AP//AAD///8AAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAHcAAMAAAAAAAAAAAAAA
|
||||
AAd3AAwMAAAAAAAAAAAAAAB3dwDAwAAAAAAAAAAAAAAHd3cMDAAAd3d3d3d3d3d3d3d3AMAAAHFxdxd3
|
||||
dxdxF3ERdwwAAABxcXFxd3dxd3Fxd3cADAwAcRdxcXERERcXdxd3AMDAAHFxcXF3d3F3cXdxdwwAAABx
|
||||
F3cXd3cXcRdxEXcAwAAAd3d3dwAAAAAAB3d3DAzAAHd3F3cAiIiIiIB3dwDADAB3cRF3CAiIiIiIB3cA
|
||||
DAAAdxcXFwiAAAAAAIB3AADAAHd3F3cIgAAAAAAIAAAADAB3dxd3CIAAAAAAAIgAAAAAd3cXdwiAAAAA
|
||||
AAAIAAAAAHd3d3cIgAAAAAAAAAAAAABxEXcXCIAAAAAAAAAAAAAAdxdxcQiAAAAAAAAAAAAAAHcXcRcI
|
||||
gAAAAAAAAAAAAABxF3F3CIAAAAAAAAAAAAAAdxd3FwiAAAAAAAAAAAAAAAAAAAAIgAAAAAAAAAAAAACI
|
||||
iIiICIAAAAAAAAAAAAAACIcAeICAAAAAAAAAAAAAAACEREiIAAAAAAAAAAAAAAAABERAAAAAAAAAAAAA
|
||||
AAAAAAREQAAAAAAAAAAAAAAAAAAEREAAAAAAAAAAAAAAAAAABERAAAAAAAAAAAAAAAD///8e///+Hf//
|
||||
/Br///gVgAAAC4AAABeAAAAPgAAAGoAAABWAAAAPgAAAF4AAAAmAAAAWgAAAG4AAAB2AA/wegAP+H4AD
|
||||
/x+AA/+fgAP//4AD//+AA///gAP//4AD//+AA///gAP//8AD///gA///8AP///h////4f///+H///w==
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
@@ -0,0 +1,129 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectType>Local</ProjectType>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{2FEB12F6-B8F7-11D6-8550-A8738D000000}</ProjectGuid>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ApplicationIcon>ROConvrt.ico</ApplicationIcon>
|
||||
<AssemblyKeyContainerName>
|
||||
</AssemblyKeyContainerName>
|
||||
<AssemblyName>ParadoxConversion</AssemblyName>
|
||||
<AssemblyOriginatorKeyFile>
|
||||
</AssemblyOriginatorKeyFile>
|
||||
<DefaultClientScript>JScript</DefaultClientScript>
|
||||
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||
<DelaySign>false</DelaySign>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>ParadoxConversion</RootNamespace>
|
||||
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
|
||||
<StartupObject>
|
||||
</StartupObject>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<NoStdLib>false</NoStdLib>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<Optimize>false</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DebugType>full</DebugType>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<NoStdLib>false</NoStdLib>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<Optimize>true</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DebugType>none</DebugType>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System">
|
||||
<Name>System</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Data">
|
||||
<Name>System.Data</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Drawing">
|
||||
<Name>System.Drawing</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Windows.Forms">
|
||||
<Name>System.Windows.Forms</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml">
|
||||
<Name>System.XML</Name>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<Content Include="App.ico" />
|
||||
<Compile Include="AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ConvertParadoxROs.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="RODBRecordInterface.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="ROConvrt.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\LibSource\DBEncapsulation\DBEncapsulation.csproj">
|
||||
<Project>{6D44F537-879E-11D6-84B8-00A0CC271352}</Project>
|
||||
<Name>DBEncapsulation</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\LibSource\ROField\ROFields.csproj">
|
||||
<Project>{0C782592-AA05-11D6-84D1-00A0CC271352}</Project>
|
||||
<Name>ROFields</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
@@ -0,0 +1,29 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ParadoxConversion", "ParadoxConversion.csproj", "{2FEB12F6-B8F7-11D6-8550-A8738D000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ROFields", "..\..\..\LibSource\ROField\ROFields.csproj", "{0C782592-AA05-11D6-84D1-00A0CC271352}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DBEncapsulation", "..\..\..\LibSource\DBEncapsulation\DBEncapsulation.csproj", "{6D44F537-879E-11D6-84B8-00A0CC271352}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{2FEB12F6-B8F7-11D6-8550-A8738D000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2FEB12F6-B8F7-11D6-8550-A8738D000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2FEB12F6-B8F7-11D6-8550-A8738D000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2FEB12F6-B8F7-11D6-8550-A8738D000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{0C782592-AA05-11D6-84D1-00A0CC271352}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0C782592-AA05-11D6-84D1-00A0CC271352}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0C782592-AA05-11D6-84D1-00A0CC271352}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6D44F537-879E-11D6-84B8-00A0CC271352}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6D44F537-879E-11D6-84B8-00A0CC271352}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6D44F537-879E-11D6-84B8-00A0CC271352}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,352 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2002 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: RODBRecordInterface.cs $ $Revision: 4 $
|
||||
* $Author: Jsj $ $Date: 1/27/03 2:56p $
|
||||
*
|
||||
* $History: RODBRecordInterface.cs $
|
||||
*
|
||||
* ***************** Version 4 *****************
|
||||
* User: Jsj Date: 1/27/03 Time: 2:56p
|
||||
* Updated in $/EXE/RefObj/ParadoxConversion
|
||||
* using OLEDB for the connection
|
||||
*
|
||||
* ***************** Version 3 *****************
|
||||
* User: Jsj Date: 10/04/02 Time: 2:02p
|
||||
* Updated in $/EXE/RefObj/ParadoxConversion
|
||||
* added better user interface
|
||||
*
|
||||
* ***************** Version 2 *****************
|
||||
* User: Jsj Date: 9/25/02 Time: 10:20a
|
||||
* Updated in $/EXE/RefObj/ParadoxConversion
|
||||
* added header
|
||||
*********************************************************************************************/
|
||||
|
||||
using System;
|
||||
//using System.Collections;
|
||||
using System.IO;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using DBEncapsulation;
|
||||
|
||||
namespace ParadoxConversion
|
||||
{
|
||||
/// <summary>
|
||||
/// This class contains a very simple interface to the RO Database.
|
||||
/// All the database conversion module needs is to create a new table
|
||||
/// and write a database record.
|
||||
/// </summary>
|
||||
public class RODBRecordInterface
|
||||
{
|
||||
bool success;
|
||||
|
||||
DBEncapsulation.DBEncapsulate DBE;
|
||||
DBEncapsulation.OLEDB_DBEncap DBE_OLEDB;
|
||||
DBEncapsulation.ODBC_DBEncap DBE_ODBC;
|
||||
|
||||
private string strAccOLEDBconn = "";
|
||||
private string strSQLOLEDBconn = "";
|
||||
private string strAccODBCconn = "";
|
||||
private string strodbcConn = "";
|
||||
|
||||
public RODBRecordInterface(int conntype, string connectstring)
|
||||
{
|
||||
// Setup the connection string
|
||||
// if (connectstring.Equals(""))
|
||||
// GetConnectionStringFromFile();
|
||||
// else
|
||||
BuildConnectionString(connectstring);
|
||||
|
||||
// Initialize the connection depending on OLE-DB or ODBC:
|
||||
conntype = 2; // for now - till valid data passed in.
|
||||
// conntype = 1; // for now - till valid data passed in.
|
||||
//END OF TEMPORARY
|
||||
|
||||
// Either use an OLE-DB or ODBC connection, depending on what was passed in.
|
||||
if ( conntype == 1)
|
||||
{
|
||||
DBE_ODBC = new ODBC_DBEncap();
|
||||
DBE = DBE_ODBC;
|
||||
}
|
||||
else
|
||||
{
|
||||
DBE_OLEDB = new OLEDB_DBEncap();
|
||||
DBE = DBE_OLEDB;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
DBE.Connection(strAccOLEDBconn);
|
||||
// DBE.Connection(strodbcConn);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine("error {0}", e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public void RODB_OpenConnection()
|
||||
{
|
||||
try
|
||||
{
|
||||
DBE.OpenConnection();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine("Error opening database connection.\n{0}",e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public void RODB_CloseConnection()
|
||||
{
|
||||
try
|
||||
{
|
||||
DBE.CloseConnection();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine("Error closing database connection.\n",e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Create a new Referenced Objects table in the current database
|
||||
*/
|
||||
public void RODB_AddNewTable(String TblName)
|
||||
{
|
||||
|
||||
string strMkTable = "CREATE TABLE "+ TblName + " (";
|
||||
// strMkTable = strMkTable + "UID Integer NULL ,";
|
||||
strMkTable = strMkTable + "RecID Char(8) NULL ,";
|
||||
strMkTable = strMkTable + "RecType Integer ,";
|
||||
strMkTable = strMkTable + "ParentID char(8) NULL ,";
|
||||
strMkTable = strMkTable + "AccPageID char(32) NULL ,";
|
||||
strMkTable = strMkTable + "ModDateTime char(14) NULL ,";
|
||||
strMkTable = strMkTable + "Info Memo NULL)";
|
||||
try
|
||||
{
|
||||
DBE.Command(strMkTable);
|
||||
// DBE.Reader();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine("Command error:\n{0}", e.Message);
|
||||
// bool retval = false;
|
||||
}
|
||||
// DBE.ReaderClose();
|
||||
try
|
||||
{
|
||||
DBE.NonQuery();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine("NonQuery error:\n{0}", e.Message);
|
||||
// bool retval = false;
|
||||
}
|
||||
DBE.CommandDispose();
|
||||
}
|
||||
|
||||
/*
|
||||
* Write an RO Database record
|
||||
*/
|
||||
public void RODB_WriteDbRecord(String DBTable, String RecID, int RecType, String ParID, String AcPgID, String DateTime, String Info)
|
||||
{
|
||||
String DbRecCmd;
|
||||
|
||||
// if no RecID provided, then get the next available one.
|
||||
if (RecID.CompareTo("") == 0)
|
||||
{
|
||||
RecID = RODB_GetNextRecid(DBTable);
|
||||
}
|
||||
|
||||
DbRecCmd = "INSERT INTO " + DBTable + " (RecID, RecType, ParentID, AccPageID, ModDateTime, Info) VALUES ('";
|
||||
DbRecCmd += RecID + "', " + RecType + ", '" + ParID + "', '" + AcPgID + "', '" + DateTime + "', '" + Info + "');";
|
||||
try
|
||||
{
|
||||
DBE.Command(DbRecCmd);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
success = false;
|
||||
Console.WriteLine("RODB_WriteDbRecord Caught an exception:\n{0}", e.Message);
|
||||
}
|
||||
try
|
||||
{
|
||||
DBE.NonQuery();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine("NonQuery error:\n{0}", e.Message);
|
||||
// bool retval = false;
|
||||
}
|
||||
DBE.CommandDispose();
|
||||
}
|
||||
|
||||
public void GetConnectionStringFromFile()
|
||||
{
|
||||
/* This file should contain the connection strings in the followin order:
|
||||
* AccOLEDBconn, SQLOLEDBconn, AccODBCconn, odbcConn.
|
||||
*/
|
||||
// append "ConnectList.txt" to the path of the location of the exe being run
|
||||
// for example: VE-PROMS.NET\BIN or BIN\DEBUG
|
||||
// This set in Visual Studio .NET in the properties dialog of the project, select
|
||||
// Configuration Properties. You will see an option call Output Path.
|
||||
string FileName = Application.StartupPath + "\\ConnectList.txt";
|
||||
|
||||
if (!File.Exists(FileName))
|
||||
{
|
||||
// File does not exist
|
||||
Console.WriteLine("Could not find ConnectList.txt file");
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Open the text file for reading
|
||||
*/
|
||||
StreamReader sr = File.OpenText(FileName);
|
||||
|
||||
/*
|
||||
* Connection string to MS-access use with oledb directly
|
||||
*/
|
||||
strAccOLEDBconn = sr.ReadLine();
|
||||
|
||||
/*
|
||||
* connection string to SQL-server use with oledb
|
||||
*/
|
||||
strSQLOLEDBconn = sr.ReadLine();
|
||||
|
||||
/*
|
||||
* connection string to for oledb to odbc dsn
|
||||
*/
|
||||
strAccODBCconn = sr.ReadLine();
|
||||
|
||||
/*
|
||||
* ODBC connection:
|
||||
* ACCESS:
|
||||
*/
|
||||
strodbcConn = sr.ReadLine();
|
||||
|
||||
sr.Close(); // close ConnectList.txt
|
||||
|
||||
}
|
||||
|
||||
public void BuildConnectionString(string DataConnectionPath)
|
||||
{
|
||||
/*
|
||||
* Connect to MSAccess using OLEDB directly
|
||||
*/
|
||||
|
||||
// strAccOLEDBconn = "Provider=Microsoft.Jet.OLEDB.4.0;Password=\"\";User ID=Admin;Data Source=I:\\RO Design\\RO\\ROMaster.mdb;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=1;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";
|
||||
|
||||
strAccOLEDBconn = "Provider=Microsoft.Jet.OLEDB.4.0;Password=\"\";User ID=Admin;Data Source=" + DataConnectionPath +"\\ROMaster.mdb;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=1;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";
|
||||
|
||||
/*
|
||||
* Connect to SQL-server using OLEDB
|
||||
*/
|
||||
// !!!!! do we need the Workstation ID? if so, we need to pass this in too!
|
||||
|
||||
// strSQLOLEDBconn = "Provider=SQLOLEDB;Persist Security Info=False;User ID=sa;Initial Catalog=ROMaster;Data Source=DELL-W2K-SERVER\\SQL2000;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=KATHY;Use Encryption for Data=False;Tag with column collation when possible=False";
|
||||
|
||||
strSQLOLEDBconn = "Provider=SQLOLEDB;Persist Security Info=False;User ID=sa;Initial Catalog=ROMaster;Data Source=" + DataConnectionPath +"\\ROMaster.mdb;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=KATHY;Use Encryption for Data=False;Tag with column collation when possible=False";
|
||||
|
||||
/*
|
||||
* Connect to MSAccess using OLEDB and ODBC DSN
|
||||
*/
|
||||
|
||||
// strAccODBCconn = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=Access for RO;Extended Properties=\"DSN=Access for RO;DBQ=I:\\RO Design\\RO\\ROMaster.mdb;DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;\"";
|
||||
|
||||
strAccODBCconn = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=Access for RO;Extended Properties=\"DSN=Access for RO;DBQ=" + DataConnectionPath + "\\ROMaster.mdb;DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;\"";
|
||||
|
||||
/*
|
||||
* Connection to MSAccess using an ODBC connection
|
||||
*/
|
||||
// strodbcConn = "Driver={Microsoft Access Driver (*.mdb)};DBQ=i:\\Ro Design\\RO\\ROMaster.mdb";
|
||||
strodbcConn = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" + DataConnectionPath + "\\ROMaster.mdb";
|
||||
|
||||
// Connection to SQL Server using an ODBC connection
|
||||
//strodbcConn = "Driver={SQL Server};Server=DELL-W2K-SERVER\\SQL2000;UID=sa;Database=ROMaster";
|
||||
|
||||
//SQL - DSN - worked: string strodbcConn = "DSN=SQL RO;UID=sa";
|
||||
//Initial odbc tests on strodbcconn
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the next available RO Database RecID
|
||||
*/
|
||||
public String RODB_GetNextRecid(String DBTable)
|
||||
{
|
||||
String NextRecID="";
|
||||
String RtnStr = "";
|
||||
String SpcStr = " ";
|
||||
String ZeroStr = "0";
|
||||
String DbCmd = "SELECT Info FROM " + DBTable + " WHERE RecID = '00000000'";
|
||||
|
||||
try
|
||||
{
|
||||
DBE.Command(DbCmd);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
success = false;
|
||||
Console.WriteLine("RODB_GetNextRecid - Read NextRecID Caught an exception:\n{0}", e.Message);
|
||||
}
|
||||
|
||||
|
||||
if (DBE.Reader())
|
||||
{
|
||||
if (DBE.Read())
|
||||
{
|
||||
RtnStr = DBE.GetString(0);
|
||||
DBE.ReaderClose();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
System.Windows.Forms.MessageBox.Show("Could Not Open Reader");
|
||||
}
|
||||
|
||||
// Create the new next RecID
|
||||
if (RtnStr.CompareTo("") != 0)
|
||||
{
|
||||
uint nxID = Convert.ToUInt32(RtnStr,16);
|
||||
nxID++;
|
||||
NextRecID = String.Format("{0,8:X}",nxID);// 8 char field padded on left with blanks
|
||||
NextRecID = NextRecID.Replace(SpcStr,ZeroStr);
|
||||
}
|
||||
else
|
||||
{
|
||||
// there is no next RecID
|
||||
Console.WriteLine("RODB_GetNextRecid No Next RecID!");
|
||||
}
|
||||
|
||||
// Write the new next RecID
|
||||
DbCmd = "UPDATE " + DBTable + " SET " + DBTable + ".Info = '" + NextRecID + "'";
|
||||
DbCmd = DbCmd + " WHERE RecID = '00000000';";
|
||||
|
||||
try
|
||||
{
|
||||
DBE.Command(DbCmd);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
success = false;
|
||||
Console.WriteLine("RODB_GetNextRecid - Write new NextRecID Caught an exception:\n{0}", e.Message);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
DBE.NonQuery();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine("NonQuery error:\n{0}", e.Message);
|
||||
// bool retval = false;
|
||||
}
|
||||
DBE.CommandDispose();
|
||||
|
||||
return RtnStr;
|
||||
}
|
||||
}
|
||||
}
|
BIN
PROMS/ReferencedObjectsOld/Exe/RefObj/ParadoxConversion/V.ico
Normal file
BIN
PROMS/ReferencedObjectsOld/Exe/RefObj/ParadoxConversion/V.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
</startup><runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" appliesTo="v1.0.3705">
|
||||
</assemblyBinding></runtime></configuration>
|
Reference in New Issue
Block a user