![]() You can prompt a user for their uid/password, execute the logon and NOW all linked tables like magic will use that logon/pass and do NOT have to be linked and thus you don’t have to store the userid/logon in the application or in the linked table(s) connection strings.Characteristics "The perfect weapon for the modern age! Built for combat! With tactical responses more acute than any human soldier!" -Gunnar Eversol ( src) So using cached logons and passwords results in NOT having to include password and logon in those strings. Not only is such a process time consuming, but prone to MUCH failure and if the application is shutdown incorrect then the “proposed” schemes here of using custom linking will not only fail, but are impractical solutions. And worse is on shutdown you have to re-link the tables gain, else they all be in that linked state with full uid/passwords in plain sight. It makes LITTLE sense to encrypt the connection string, since then on startup you have to re-link with plain connection strings NOW in sight. ![]() Power Tip: Improve the security of database connections How to achieve this is outlined in detail here: ' this does assume user has enough rights to query built in 'Any VALID SQL statement that runs on server will work below. The logon code I use is thus this: Function TestLogin(strcon As String) As Boolean The VERY INSTANT you execute a SQL logon, then all linked tables WITHOUT userid/password WILL NOW WORK! What you thus do on startup is execute a logon. Thus there is no need to worry about users looking at the connection string. ![]() Thus you DO NOT include the uid and password in the connection string. That means the plain text connections in the Access linked tables do NOT require the user id and password.Ģ – use cached logons. At this point any user placing their cursor over a linked table will see the user id and password in plain sight (so you gain little if anything by this suggested approach).ġ – use windows authentication on SQL server. Thus the ONLY possible way this could work is if you take the encrypted connection, de-crept and re-link to SQL server with the plan text connect strings with the user ID and password in plain sight. Any suggesting here about having some “encryption” routine will NOT WORK and is NOT relevant since if you modify or mess with the connection strings in your linked tables, then the linked tables will fail. Unfortunately, if you modify or encrypt the connection in the linked table then you will find that you cannot connect to SQL serer. If Mid(LowerSub, lngE, 1) = strLetter Then GoTo LSubĭecrypt = Decrypt & Mid(LowerAlpha, lngE, 1) If Mid(UpperSub, lngE, 1) = strLetter Then GoTo USubĭecrypt = Decrypt & Mid(UpperAlpha, lngE, 1) StrDecrypt = strDecrypt & Chr(Asc(Mid(strvalue, lngi, 1)) - 13) Then work backwards to decrypt: Public Function Decrypt(strvalue As String) As String 'Now pass this string through ROT13 for another tier of securityĮncrypt = Encrypt & Chr(Asc(Mid(strEncrypt, lngi, 1)) + 13) StrEncrypt = strEncrypt & Mid(LowerSub, lngE, 1) ![]() If Mid(LowerAlpha, lngE, 1) = strLetter Then GoTo LSub StrEncrypt = strEncrypt & Mid(UpperSub, lngE, 1) If Mid(UpperAlpha, lngE, 1) = strLetter Then GoTo USub You can use the old "Zebras" method, by assigning different letters to the alphabet (you could also use some numbers or other ASCII characters instead): Public Function Encrypt(strvalue As String) As StringĬonst LowerAlpha As String = "abcdefghijklmnopqrstuvwxyz"Ĭonst LowerSub As String = "zebrascdfghijklmnopqtuvwxy" 'zebrasĬonst UpperAlpha As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"Ĭonst UpperSub As String = "ZEBRASCDFGHIJKLMNOPQTUVWXY" 'ZEBRAS There is no native way to encrypt/decrypt in Access, but it's not hard to create your own. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |