I can't seem to find much information on this topic:
I want to create a basic connection with defined parameters (or maybe everything distinct besides perhaps what database) within an ODBC connection (32 bit).
I've scoured google and I can't seem to find any example within wix of creating a simple ODBC connection. (specifically an oracle connection)
Does this require a custom action (im new to Wix, and not super far into the tutorials/books) or is there a way for me to hardcode it into wix (bad practice I know, but just for practice)
Thanks
You should use a custom action for this. There is no other way of connecting a database with wix. Custom action is the only way.
To write a custom action try this http://blogs.msdn.com/b/jschaffe/archive/2012/10/23/creating-wix-custom-actions-in-c-and-passing-parameters.aspx
Related
Like the title says, I've installed both the System and Microsoft .Data.SqlClient SQL packages, and my code only recognizes the Microsoft one, but it doesn't recognize the using System.Data.SqlClient; statement. I've done this process before successfully in a console app, but in the XamForms app it doesn't work. As a result, I cannot use the SqlConnection or SqlCommand or SqlDataReader objects which make it a tad bit difficult to make a SQL database app if ya know what I mean.
I want to put my "login" to my SQL server in a separate file so that I can change them easily should I decide to launch this app publicly. My best guess is that I have to do this in a specific part of the XamForms app, but I don't know where if there is a specific spot. For the time being however, I would just like to get the .Data.SqlClient working regardless of where I put it.
System.Data.Sqlclient has dependencies on libraries that do not exist in iOS/Android. And even if they did, it is a really, really, really bad idea to have direct access from a mobile app to your SQL server. This is how SQL servers get hacked and companies lose their users data and then get sued out of existence.
Background
I have an Excel application that connects to SQL Server using ADODB Connection via VBA. This ADODB Connection contains credentials that are hard coded. I know this is not best practice.
Issue
It has come to my attention that there are some users that are using this method to access password protected VBA modules, and retrieve connection credentials. Which they use it to access the server.
Possible Solution?
I am considering possible solutions to hide the connection string from VBA or set up a secure connection string using this method.
I wonder if it is possible to build this class with the credentials built in, so that in the VBA we do not hard code the credentials, rather just refer to this connection class?
Anyone here has experience with this?
I have looked at this solution. However, I am using a 2017 version of Visual Basic and I am unable to follow the step-by-step guide. In particular, I was unable to find the activeX reference.
I would really appreciate any help with this.
Many thanks.
Using VB.NET, I can connect to a local SQL database easily, but, trying to get more advanced graphical features, I started using SilverLight for VB.NET, and so i got this problem.
Is it possible to connect a local database, and it must be SQL, with SilverLight for VB.NET?
It must be Out Of Browser too, i'm doing a Desktop App.
If there's no really way to do it, how can i make a more beatiful system, as I don't want to make the same old windows style.
Yes, you can access a db with Silverlight. As to how, the same ways you'd do it without SL really. Personally I use EntityFramework, and create a model from my database. Then I operate on that model using the context generated.
It doesn't matter if the db is local or remote, the methods are the same - they are just connection strings after all.
please give me some advice. I have to send email using SQL database mail. In my email, I have to create links that a user can click to go to a product page on my site. However, I need to encrypt the ID of the product and once the product page load, the querystring of the product ID will be decrypted.
How can I get the encryption algorithm which I created in web site class into SQL? I believe the decryption and encryption algorithm must be the same, so that my page can decrypt correctly when the user click on the link in their email. The encryption class I use is something similar to this link: http://www.codeproject.com/Articles/33350/Encrypting-Query-Strings
Thanks a lot for your help.
PS: I also posted this question on asp.net forum.
You can run CLR (ie .NET) code within SQL Server. There are several steps involved, but it starts with creating an "SQL Server" project within Visual Studio, writing the code, and deploying it to your SQL Server. You also have to enable CLR functions within SQL Server using sp_configure.
See here (MSDN) for detailed instructions: How to: Create and Run a CLR SQL Server User-Defined Function .
After doing quite some research, I can confirm that CLR is the way to go. As suggested, I used user defined function CLR. First I need to create CLR project in visual studio. Here is a good starting point to understand how it works:
http://blog.sqlauthority.com/2008/10/19/sql-server-introduction-to-clr-simple-example-of-clr-stored-procedure/
Then instead of adding a CLR stored procedure I move to User defined function. Add an encryption class and called the class in the user defined function. Build and Deploy. That's it.
Here is another useful links:
http://channel9.msdn.com/Learn/Courses/SQL2008R2TrainingKit/CLR/CLRIntegrationLab/Exercise-1-Creating-User-Defined-Functions-Using-SQL-CLR
Thanks dbaseman for pointing that out.
I think my question says it all.
I've been trying to learn from:
http://www.tramontana.co.hu/wix/lesson7.php#7.1
but it doesn't seem to have the case of creating a new database user. I learn best by example, so if anyone has an example to share, I'd be very appreciative!!
-Adeena
This is not supported directly by WiX. I'm not sure if there is a setup authoring tool which offers direct support for this. Most of them allow you to create only Windows user accounts.
To create a MySql user you can write a custom action using custom code. You can use an EXE or a DLL.