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.
Related
I want to build an authentication system based on an Excel spreadsheet database. Therefore I would like to know if it's possible to use ADO.NET in the IDE integrated in Excel. (I don't want to use visual basic studio)
If you add a reference to the ActiveX Data Objects, you can use the ADODB suite of objects - Connection, Command, ResultSet etc.
I presume what you'd do is just show the "Login" sheet on opening the file and then, on successful authentication, show other sheets.
As it's Excel though, I'm not sure how easy it would be to bypass for somebody with a reasonable amount of knowledge.
Best of luck with it.
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
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.
I need to query Active Directory and build my MS Access database using the results. I found some code here. As you can see, part of this code is creating an ADODB.Connection object. Is this the only method for connecting to AD? Is it possible to use DAO objects?
I've never taken any courses on databases so forgive me if this question makes no sense.
Thanks!
As you can see part of this code is creating an ADODB.connection object. Is this the only method for connecting to AD? Is it possible to use DAO objects?
Personally I wouldn't recommend trying to use DAO to query AD. DAO works very well to manipulate Access database tables from within Access itself, but for Access VBA code to manipulate any data source that isn't...
a local Access table or
an Access "linked table"
...I would recommend using ADO. You can use the code samples in the article you cited, and if you run into any difficulties you will be much more likely to receive meaningful assistance.
I want to create a global connection class from Sql server database to vb.net to make it easy in later editing the connection. Could anyone guide me the way to code both creating and calling to individual form?
Any help would be appreciated. Thanks
Keep your connection string in your web.config file. (this gives you a single point where you can change the connection string without needing to recompile your application, it also allows you to encrypt it in the future to protect your DB server).
I'd advise against using a single "connection" object for reuse. Open and close a connection for each query or transaction.
Check out the Repository pattern instead. http://msdn.microsoft.com/en-us/library/ff649690.aspx