Insert data in MS Access 2013 through groovy - ms-access

I want to insert a row in MS Access database using Groovy. I don't know what are the drivers needed and where they can be downloaded from. I am using Groovy 2.4.7 and MS Access 2013. Please tell me what has to be done clearly as I am new to Groovy. Any code would be appreciated.
TIA

You just need a JDBC driver that works with MS Access (same as if you were using Java).
One candidate (open source LGPL or Apache licensed):
http://ucanaccess.sourceforge.net/site.html
The Groovy docs provide examples of how to use SQL:
http://docs.groovy-lang.org/latest/html/api/groovy/sql/Sql.html

Related

Generate graphql schema based on the SQL Server 2014 database

I am in the process of developing an API using Graphql and asp.net core 2.Can anyone help me to know is there any nuget package or open source solution to generate schema based on the SQL Server 2014 database.
I see that there is a solution for java : https://github.com/leangen/graphql-spqr
You could use sql-to-graphql to generate GraphQL schemas and server based on SQL table structure. The only problem with this, is that the project is unmaintained.

MySQL Data Source Entity in Visual Studio 2012

I have also encountered the problem to create a data source in VS2012 with MySQL connector, while many thanks for the connector updates from Oracle.
Than I installed the MySQL connector version 6.6.5, it looks work well while there is no directory in the "Data Source" sub-window but the Model has been created after I created the data source.
When I configuring the insert process to the data using Linq, VS2012 tells there is no such method "AddTo".
Therefore, according the things happened during my programming:
Is it common that the data source will not be shown in that sub window after I have already add the data entities?
Why there is no such method "AddTo" (Actually no any methods at all in the definition) when I using Linq with VS2012?
Many thanks in advance,
Harry

Object Data Source in Visual Studio 2012 Express for Web

I'm trying to follow various tutorials on how to create LINQ to SQL classes and they all say I should connect to the Object Data Source. However there's no such source available to select in Visual Studio 2012 Express for Web. Is this a limitation of the Express for Web edition? I have tried to find info on this, but haven't found anything. Is there a workaround?
I figured it out. This should be done through Project->Add New Data Source. Not Tools->Connect to Database or Database Explorer.

linq to mySQL How can I trick VB Express to use it?

I'm currently using VB.NET Express to connect to mySQL over the net. No problem as long as I use plain vanilla SQL connections and statements.
But when it comes to LINQ 2 mySql, I'm struck by VB Express's limitation.
Any clue you gurus?
You'll need to switch out to using something like DBLinq, Entity Framework, or nHibernate instead of Linq-to-SQL. Linq-to-SQL only supports SQL Server and SQL Server CE. This isn't a
limitation of Visual Studio Express at all. Actually, the only limitations I know of with the express editions are that they don't support any Visual Studio plug-ins - but as far as CLR features, you aren't limited at all using Express. And, Entity Framework is built-in and available for you to use out of the box. And stackoverflow has info on the MySQL connector.
After a couple of days searching, Iv' finally reached the Saint Graal!
Since you guys at StackOverflow are so great a bunch of blokes, I've written a little how to sample for you. Here it is:
1 - The ONLY sensible, free and working product I've founr is Devart LinqConnect Express edition.
Its a free product from www.devart.com, capable of:
(Please note I have no particular links nor interest with them.)
Generating datacontext from its own embarked Devart EntityDeveloper free edition
(With some limits in number of tables per context, 10 if I'm right).
Complete the LINQ dlls into Visual Basic Express edition, without having to create a datasource from the datasource explorer.
Ok, once you've installed the package, here's the how to:
Launch the Entity designer from Program Files\Devart LinqConnect and create the model from the database.
Save the model and launch your VB Winform project.
Add the following .NET references:
Devart.Data.Linq
Devart.Data.MySql.Linq '-- Or any other DB you need
System.Data.Linq
Now add the new datacontext.designer.vb file you've created in Entity Developer
to the project:
Right-click the project in Solution Explorer and select
Add existing item
Locate the datacontext file and that's almost it!
Create a button and a datagridview named dgv1 onto your form.
5 more lines of code and you're set!
Button code:
Dim ctx As New myDataContext.myDataContext
Using ctx
Dim tbl = From xxx In ctx.myTable
Select xxx
dgv1.DataSource = xxx.ToList
End Using
The rest is pure cosmetic LOL...
It is worth to mention that although their product is great, the support is great as well!
They answered my questions in less than 12 hours.

ado.net data service with mysql 6.2.3

I'm using .Net 3.5 SP1. Just installed ADO.Net Data Service (ADO.NET Data Services Update for .NET Framework 3.5 SP1 )
I can successfully create Entities using ADO.Net Entity Framework. I'm following this article Create OData Feed. Instead of config.SetEntitySetAccessRule("*", EntitySetRights.AllRead); I have config.SetResourceContainerAccessRule("*", ResourceContainerRights.None);.
But the end result is I can only see <atom:title>Default</atom:title>.
Please help
Thanks in advance.
If you set the rights to None, then nobody can access anything on the service. As a result all the entity sets are hidden and that's why you see nothing in the service document.
The data service hides entity sets and types which are not accessible (behaves as if they don't exist).
You need to allow access to at least something in order to use the service.