Solved

Delphi 7 SQL Error "Login failed for user <domain>\guest"

Posted on 2009-04-06
10
1,212 Views
Last Modified: 2013-11-23
I am using this program to explore how to connect to SQL databases in delphi 7
http://delphi.about.com/library/weekly/aa071205a.htm

When run the program on the server machine I connect and run the program just fine with no problems
But if I use the program on a client pc, open the Connect to SQL server dialog and click on a server to connect to It then errors with "Login failed for user <domain>\guest" and the List of available databases are blank.

anyone got ideas? the SQL server is running with SQL server Desktop 2000

I can understand the error when trying to login to a computer, but why the error when trying to view aviailable databased on a server? can anyone help, ask for better clarification anything?
0
Comment
Question by:jamerslong
  • 5
  • 3
  • 2
10 Comments
 
LVL 37

Expert Comment

by:Geert Gruwez
ID: 24087044
first suggestion:
add mssql to the zones

second suggestion:
use the latest version: MSSQL express

second suggestion:
there is a network utility in the bin to open the Database to outside connections
SVRNETCN.exe


This is an old version of the software ...
http://www.microsoft.com/downloads/details.aspx?familyid=413744D1-A0BC-479F-BAFA-E4B278EB9147&displaylang=en

this is the new version
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=220549b5-0b07-4448-8848-dcc397514b41
0
 
LVL 4

Author Comment

by:jamerslong
ID: 24088421
thanks,

a: Allthough I would like to upgrade the SQL server, i am afraid it my cause interuptions with my works software and we absolutely cannot afford a system down time of more then about 5 minutes, I would like to avoid that.

b: svrnetcn, I will take a peak at this, But i do wonder. If the database can be accessed by the client software it was intended for, then why not my software?
0
 
LVL 37

Accepted Solution

by:
Geert Gruwez earned 500 total points
ID: 24105088
it looks like your connection is using Windows Security.
do you have a database user and password to use for connection ?

to test a connection on a other PC,
on the desktop, create a new file with extension .udl
double click it and a connection wizard will be opened
use the first tab to set the provider
then the second tab to set user and pass
it the connection test works you can see the connection string by changing the extension to .txt and opening the file
0
MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

 
LVL 4

Author Comment

by:jamerslong
ID: 24107841
hey thats cool stuff there, It is using windows security to connect, but I dont know how to program it to use anything otherwise. My wife just had a baby yesterday so I will not be at work for a bit. but when I get there I will be sure to try it.
0
 
LVL 37

Expert Comment

by:Geert Gruwez
ID: 24107863
congrats on the family extension
let's hope it's yours, it's got the right colour ?
0
 
LVL 4

Author Comment

by:jamerslong
ID: 24108138
lol it belongs to me, it has my giant feet.
0
 
LVL 22

Expert Comment

by:senad
ID: 24284037
if it uses windows security then you should be able to log on using windows
username and password (that is if you belong to the administrators group).
No big deal...
0
 
LVL 22

Expert Comment

by:senad
ID: 24284049
How to create a sql server login :
http://msdn.microsoft.com/en-us/library/aa337562.aspx
0
 
LVL 4

Author Comment

by:jamerslong
ID: 24284424
Ok so I did the .Udi thing and i was able to connect to the DB, Now it is saying the database itself has a password, I dont understand how I can access the database from the server without any login protocals but requires a password when accessed from another computer for both server login and database access?

how could I find out the password to the Database? I have the SA password and the Admin password, however I do not have time to figure out if the Admin would work but SA did not :(
0
 
LVL 4

Author Comment

by:jamerslong
ID: 24287300
I managed to get it all worked out with Geerts Suggestion :) saving me from myself time and time again
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question