Solved

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

Posted on 2009-04-06
10
1,222 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
sql query help 15 52
SQL Recursion schedule 13 34
Add New Database Table in database file using delphi 3 29
SQL Syntax 6 30
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand columnThat will then direct you to their download page.From that page s…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

749 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