sql

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » SQL

SQL

resolvedResolved · Low Priority · Version 2003

Tim has attended:
Excel VBA Advanced course

SQL

Can I write code to incorporate passwords so I can contact SQL servers smoothly?

RE: SQL

Hi Tim. That depends a lot on the SQL server you're linking to. It is possible to write code which will detect password forms and automatically fill them with the correct login information, but this would be a time-intensive project to simply avoid a login dialog. On the other hand, incorporating passwords when contacting SQL servers is a security issue and will necessarily slow the connection process so it's something we all have to live with, unfortunately! The password setup will obviously be within the SQL software rather than in Excel, as Excel in this case is the "front end" of the process, with the server operating in the background.

Hope this helps,

Anthony

Mon 27 Apr 2009: Automatically marked as resolved.

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Excel tip:

Generating Random Numbers

To generate a random number in Excel use the = RAND() function.

The value returned will always be between 0 and 1. To convert this to some other random value, you will need to multiply the result by the highest number you want to consider. For example, if you wanted a random number between 1 and 25, you could use the following code line:
= INT(25 * RAND()+ 1)

Since RAND() will always returns a value between 0 and 1 (but never 1 itself), multiplying what it returns by 25 and then using the Integer function INT on that result will return a whole number between 0 and 24.

Finally, 1 is added to this result, so that x will be equal to a number between 1 and 25, inclusive

View all Excel hints and tips


Server loaded in 0.1 secs.