Login to reply

6 posts


by ene 2 years ago
how can i connect to an existing ms access database and possibly insert , update or delete records

by Rebin 2 years ago
Here is an example on how to use databases, this example is for SQL Server, but it will be exactly the same for any other database type.Now since you want to use access databases, in the graph there are 6 nodes that are prefixed with "SQL" (the prefix changes based on the database type) you need to change the database type to OleDB like shown below.And here is the project example.

Korduene Developer
by ene 2 years ago
thanks for the reply but i'm still struggling to load some data into the sample file you sent, i guess i dint understand how database connection strings works , assuming my access database file is located in C:\orders.mdb. How do i set this to show in the datagrid view and i also guess i could be misunderstanding one your post which you said
With this update, there are three new libraries included, which are for MySQL, SQLite and Oracle.You need to reference these libraries to fit your needs accordingly. Unfortunately due lack of time, I haven't been able to automate this process.
i think a video explaining how to use different database files from scratch will really help new users like myself 😀 Thanks for your effort in putting up this software

by Rebin 2 years ago
First I would like to apologize, as of now I honestly do not have much time to do tutorial videos.The libraries are small DLL files that are needed for using certain database types, and they are located at <Korduene installation directory>\Database.And when you see the files, you know which is for what, as the names are self-explanatory.Alright, I've updated the sample project to simply use MS Access instead of SQL.However you need to download and install Microsoft Access Database Engine.And here is a sample access database file. (credit goes to ms-access2010.com).(you need to extract the zip file)As for connection strings, it depends on how you want to use the database.Standard:
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccessFile.accdb;Persist Security Info=False;
And more on connectionstrings.comLet me know if you need anything else.

Korduene Developer
by ene 2 years ago
1 - After downloading the updated Database.zip and sample access file, 2 - i downloaded and install the Microsoft Access Database Engine ( 32 bit version) -- because im using 32 bit version of office2010.3 - extracting the Database.zip to my desktopfollowing the information i got from http://www.codeproject.com/Questions/553016/Microsoft-ACE-OLEDB-plus-pluswhereplusisplusit which reads
Ona 64bit OS;1) If 32bit is installed "ACEOLEDB.DLL" should exists here :C:\Program Files (x86)\Common Files\Microsoft Shared\OFFICE14\ACEOLEDB.DLL2) If 64bit is installed "ACEOLEDB.DLL" should exists here :C:\Program Files\Common Files\Microsoft Shared\OFFICE14\ACEOLEDB.DLLOn a 32bit OS;"ACEOLEDB.DLL" should exists here :C:\Program Files\Common Files\Microsoft Shared\OFFICE14\ACEOLEDB.DLL
4 - i copied the ACEOLEDB.DLL form it location and pasted it to <Korduene installation directory>\Database5 - i run the sample Database you sent , then go to project properties > references > Add reference i located the pasted ACEOLEDB.DLL at <Korduene installation directory>\Database6 - As i clicked OK , an error message showed up , below is the error i got
System.BadImageFormatException: Could not load file or assembly 'file:///C:\Users\mali\Desktop\Database\Libraries\ACEOLEDB.DLL' or one of its dependencies. The module was expected to contain an assembly manifest.File name: 'file:///C:\Users\mali\Desktop\Database\Libraries\ACEOLEDB.DLL' at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark) at System.Reflection.Assembly.ReflectionOnlyLoadFrom(String assemblyFile) at Korduene.Project.ProjectAssemblies.?????????????????????????????????(String ) at Korduene.Project.ProjectAssemblies.RefreshAssemblies() at Korduene.Dialogs.ProjectPropertiesDlg.btnOK_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.RunDialog(Form form) at System.Windows.Forms.Form.ShowDialog(IWin32Window owner) at System.Windows.Forms.Form.ShowDialog() at Korduene.MainWindow.projectPropertiesMenuItem(Object sender, EventArgs e) at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e) at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e) at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met) at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met) at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ToolStrip.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(Form mainForm) at Korduene.Program.Main(String[] args)WRN: Assembly binding logging is turned OFF.To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.Note: There is some performance penalty associated with assembly bind failure logging.To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
after the error, korduene hangs and forced to quit. i noticed that the ACEOLEDB.DLL is being copied into the project Libraries folder after the error .i guessed i copied the wrong DLL file into the <Korduene installation directory>\Database

by Rebin 2 years ago
Perhaps I didn't make this quite clear, after installing Microsoft Access Database Engine, you do not need to copy any DLLs anywhere, after installing it, simply run the project.So now you might want to remove the copies of the dll you created (<Korduene installation directory>\Database & the project's library directory) and just run your project.

Korduene Developer
Login to reply
;