Using directive for package added in Visual Studio Code - mysql

I'm trying trying to build a web app with ASP.NET Core 3.0 and using VS Code to do it. Moreover, I'm using MySQL for my database, and this is where things are getting rough. It seems like there's very little support out there for this particular combination of VS Code and MySQL.
I can't find any tutorials with this particular combination, so I can't figure out how to put it all together. I ran the dotnet add package Mysql command, which installed the package, and I see that it's been added to the .csproj file, except now I don't know how to make use of it in my Model file. I'm trying to find the using directive for it, but I can't find any posts on any forums addressing this issue.

Related

where in the windows path should mysql be added?

i'm looking to add mysql to the windows path since i had trouble getting it to work
without adding it. Im wondering which variable I have to add it to to get it to work, below are the variables i have in path(i split the c:\app variable between two image due to not wanting to show username):
the variables in the path
first part of app variable
second part of app variable
I would appreciate any help or advice on the matter that could be provided.
I have tried installing and uninstalling mysql, i tried installing visual c++, among other things. Im hoping to get Mysql to work properly.

package configurations vs project configurations

I am wondering what considerations can lead to choosing package-configurations over project-configurations (or vice-versa) on Sql Server 2012.
I for example was told that using package-configurations it was easier to migrate ETL's from one machine to another.
edit: the question is about package configurations vs project configurations, not about package-parameters vs project parameters
If multiple packages in the same project are going to share the same parameter, and you want to be able to change it once and have that change affect all packages, you would make it a project parameter.
If only one package should use it, and you should be able to change it without affecting other packages in the same project, then you should make it a package parameter.
This is the only factor I consider when deciding.
It seems there is nothing that package-configuration can do which Project-configuration cannot do. The opposite is true however.

Datasnap / dbExpress deployment issues

I'm playing around with setting up a Datasnap server on IIS at the moment.
I have managed to get the default Datasnap / Javascript demo to work, and have extended it to include my own string based results to a version of the webpage.
However I am being stumped moving to the next level.
I want to add in a database module and return results from a MySQL database accessed via dbExpress.
As soon as I add a datamodule with a TSQLConnection and TSQLQuery on it and roll out the compiled dll the server stops working. Remove the Datamodule and recompile and everything is fine.
I've tried adding the libmysql.dll and dbxmysql.dll to the website root and adding them to the ISAPI restriction list to allow them to run, but I'm obviously missing something else.
Update
Following some more testing the core issue is with adding an extra datamodule for the TSQLConnection & TSQLQuery. If I include these on the TServerMethods1 unit then the app works...
Dan, insert MidasLib in your USES clause, better than deploying another dll, this will keep everything you need in your executable.

Subsonic 3.0.0.3 with MySQL 4template is not working

I am ready and see all the tutorials and videos to configure the subsonic 3.0.0.3 with MySql and fail to genarate the ActiveRecords.cs. I use the MySQL.ttinclude in the folder to generate the class but it is still not working. I rename all the refenreces to SQLServer.ttinclude to MySQL.ttinclude and it still does not work. The error is: Metadata file "MySql.Data" could not by found.
I really need to use the subsonic version 3.0.0.3 with MySql 5.1.
I ran into the same issue. Make sure you actually run the installer for the MySQL connector as that put everything in the GAC. I tried to get it to work by just adding the ref to MySql.Data, and I got the same error as you. Everything worked perfectly once I ran their install.
Yes, all reference is setting. The two dlls Subsonic.core.dll and MySql.Data.dll. I think that's probable a bug int the 4templates for MySql. Many people still have problems whit the version for MySql. In the videos of rob for configurin and setting MySQL generate, it still work perfectly, but the files in the pack 3.0.0.3 are different.
dunno if you got same problem but i had trouble and it was because i had a C# project but was using the VB templates and it never created the files, also i have used mysql connector 6.1 if this helps as i think this is the most compatable version when it comes to stuff like this.
Yes, Iam using MySQL Connector 6.1 whit provider. Now I try to generate my class with the 4Templates to LINQ, but I don't have success. I see this error in VStudio 2008
Warning 1 Multiple template directives were found in the template. All but the first one will be ignored. Multiple parameters to the template directive should be specified within one template directive.
When I try to generate the class with the templates for Active Record, It's works, wonderfull, but I realy need the LINQ templates class generated.

How to add a version number to an Access file in a .msi

I'm building an install using VS 2003. The install has an Excel workbook and two Access databases. I need to force the Access files to load regardless of the create/mod date of the existing databases on the user's computer. I currently use ORCA to force in a Version number on the two files, but would like to find a simpler, more elegant solution (hand editing a .msi file is not something I see as "best practice".
Is there a way to add a version number to the databases using Access that would then be used in the install?
Is there a better way for me to do this?
#LanceSc
I don't think MsiFileHash table will help here. See this excellent post by Aaron Stebner. Most likely last modified date of Access database on client computer will be different from its creation date. Windows Installer will correctly assume that the file has changed since installation and will not replace it.
The right way to solve this (as question author pointed out) is to set Version field in File table.
Unfortunately setup projects in Visual Studio are very limited. You can create simple VBS script that would modify records in File table (using SQL) but I suggest looking at alternative setup authoring tools instead, such as WiX, InstallShield or Wise. WiX in my opinion is the best.
Since it sounds like you don't have properly versioned resources, have you tried changing the REINSTALLMODE property?
IIRC, in the default value of 'omus', it's the 'o' flag that's only allowing you to install if you have an older version. You may try changing this from 'o' to 'e'. Be warned that this will overwrite missing, older AND equally versioned files.
Manually adding in versions was the wrong way to start, but this should ensure that you don't have to manually bump up the version numbers to get them to install.
Look into Build Events for your project. It may be possible to rev the versions of the files during a build event. [Just don't quote me on that]. I am not sure if you can or not, but that would be the place I would start investigating first.
You should populate the MsiFileHash table for these files. Look at WiFilVer.vbs thtat is part of the Microsoft Platform SDK to see how to do this.
My other suggestion would be to look at WiX instead of Visual Studio 2003 for doing installs. Visual Studio 2003 has very limited MSI support and you can end up spending a lot of time fighting it, rather than getting useful work don.