Wednesday, March 28, 2012

Microsoft SQL 2000 Login Problem

Hi,

I'm trying to slove this problem from last few hours. I cannot slove this problem. Getting following error message if i try to login in Microsoft SQL Server 2000. Programming in Visual Studio NET -> MFC...

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.



CDBVariant value;
CDatabase db;
char sql_statement [2048] = "";

//CDatabase object "db" created to connect database
db.OpenEx(_T("DSN=MQIS"),CDatabase::noOdbcDialog);
.
.
.
.

can someone please help me out, is something wrong with the code ??does your DSN include a username and a password ?|||well,

i didn't created one. I had a computer crash... and i had to reinstall everything. but know my sourcecode isnt working anymore. even with username dbo it isn't working

weird. must be wrong with the sql server 2000|||"db.OpenEx(_T("DSN=MQIS"),CDatabase::noOdbcDialog)"

you have to create a new DSN named MQSI
with a integrated user and a password
or specify them after after the DSN

"db.OpenEx(_T("DSN=MQIS;UID=sa;PWD=password")...|||how can i create a new dsn name ??

when installed last time before this time the sql server 2000 i used the beauty and could login with it as a dsn name. like "DSN=beauty" the name of my server is now "motherindia" but i cant login now anymore. i didnt did anything different then before.|||In your

> Config Pannel
> Administration Tools
> ODBC Data Sources

Add a new System Data Source
named "MQIS"|||i dont have these options in Microsofts sql server|||This is not done in SQL Server
but on your Computer ...|||lol

thx.. i had to choose the same name

works pefectsql

No comments:

Post a Comment