RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: Enterprise
Expertise: Intermediate
Apr 23, 1998



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Make Sure You are Connected to the Right Database

When issuing SQL statements against SQL Server, consider fully equating all of your table or procedure names to include the database name, especially if you are using an existing data source. Users have the ability to change the default database for their data source, which could cause your program (SQL calls) to fail because they can't find what you are talking about. You can also define the database you are connecting to when you open a connection, which will override the users' default.
Private Sub LoadGrid()
    Dim sSql as string

    'Example of specifying full name of database and table
    sSql = "select * from pubs.dbo.authors " &_
              "where au_lname = 'Smith'"
End Sub
Joe Karbowski
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date