Showing posts with label connecting. Show all posts
Showing posts with label connecting. Show all posts

Tuesday, March 20, 2012

ASP / SQLServer connection

Hi, I'm having trouble connecting to SQLServer in my ASP program.

here's the code

<%
dim objConnection, ObjRecorSet, strConnection, strOut, objCmd, objParameters
Set objConnection = Server.CreateObject ("ADODB.Connection")
strConnection = "DSN=SQL_Tracker;Database=Tracker;UID=sa;PWD=;"
objConnection.Open strConnection
...
%
I'm getting this error on the line that opens the connection.

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user
'HOME\IUSR_HOME'.
/Tracker/list_team.asp, line 11

Notes:

I've set up the DSN called 'SQL_Tracker' in my ODBC settings.
When I use the Test Connection button it's successful.

The SQL Server is running on my own computer, and so I have
full DBA rights on it

any ideas what's wrong?Your connection string uses SQL authentication but the error message looks
like Windows authentication was attempted. Did you specify SQL
authentication or Windows authentication in your ODBC setup? Is your SQL
Server configured to allow both SQL and Windows authentication?

Also, note that you should never use 'sa' for application database
connections and you may get uninvited guests with a blank 'sa' password.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Peter Morris" <nospam.ple@.se> wrote in message
news:RmS9d.5432$xb.1658@.text.news.blueyonder.co.uk ...
> Hi, I'm having trouble connecting to SQLServer in my ASP program.
> here's the code
> <%
> dim objConnection, ObjRecorSet, strConnection, strOut, objCmd,
> objParameters
> Set objConnection = Server.CreateObject ("ADODB.Connection")
> strConnection = "DSN=SQL_Tracker;Database=Tracker;UID=sa;PWD=;"
> objConnection.Open strConnection
> ...
> %>
> I'm getting this error on the line that opens the connection.
> Error Type:
> Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
> [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user
> 'HOME\IUSR_HOME'.
> /Tracker/list_team.asp, line 11
>
> Notes:
> I've set up the DSN called 'SQL_Tracker' in my ODBC settings.
> When I use the Test Connection button it's successful.
> The SQL Server is running on my own computer, and so I have
> full DBA rights on it
> any ideas what's wrong?|||Stop using ODBC/DSN. This may not resolve the issue, but at least your
application will be faster & the database connection will be supported
in the future.

Please read the following pages.

http://www.aspfaq.com/show.asp?id=2126

http://msdn.microsoft.com/library/d..._components.asp

Peter Morris wrote:

> Error Type:
> Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
> [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user
> 'HOME\IUSR_HOME'.
> /Tracker/list_team.asp, line 11

--
Please do not contact me directly or ask me to contact you directly for
assistance.

If your question is worth asking, it's worth posting.

If its not worth posting you should have done a search on
http://www.google.com/ http://www.google.com/grphp?hl=en&tab=wg&q= or
http://news.google.com/froogle?hl=en&tab=nf&ned=us&q= before wasting our
time.sql

Sunday, March 11, 2012

AS400 driver issue

I am connecting to an AS400 from SQL Server using the iSeries Client Access. I am getting the following error when attempting to select from 1 table:

Server: Msg 7317, Level 16, State 1, Line 1 OLE DB provider 'MSDAORA' returned an
invalid schema definition.

The select looks something like: SELECT * FROM <instance>..<owner>.<tablename>

Selecting a subset of the fields (instead of all) does not make a difference.

All other table selects work fine - this is only a problem for one table

Any ideas? Your insight would be greatly appreciated. Thanks!I would guess one of the columns is of a type not understood by SQL Server.

You might have to create a view on the problem table that casts the columns to VARCHAR Types and see if it works that way.

Tim S|||We have 2 Windows 2003 servers, one running Standard Edition and the other Enterprise. Both connect to the AS400 via iseries ODBC. What is interesting is the server running standard can see the table via QA while the Enterprise cannot. However both can see the table using DTS. Strange isn't it?

Let me know your insights.

Wednesday, March 7, 2012

AS credentials confusion

I've been experimenting with the different options for connecting to
Analysis Server.
At one point I selected "Credentials stored securely in the report
server" and put in a User Name ("dummyUser") and a Password.
Then I decided to try "Credentials are not required". When I did
this, the report still worked. I looked in Profiler, and saw that
dummyUser was still there as the NTUserName.
So I thought that maybe the connection was cached, and went home for
the weekend. But I try it this morning and it still works the same
way.
Any ideas about what's happening?On Aug 28, 8:55 am, cowznofsky <jhco...@.yahoo.com> wrote:
> I've been experimenting with the different options for connecting to
> Analysis Server.
> At one point I selected "Credentials stored securely in the report
> server" and put in a User Name ("dummyUser") and a Password.
> Then I decided to try "Credentials are not required". When I did
> this, the report still worked. I looked in Profiler, and saw that
> dummyUser was still there as the NTUserName.
> So I thought that maybe the connection was cached, and went home for
> the weekend. But I try it this morning and it still works the same
> way.
> Any ideas about what's happening?
This definitely looks like a bug, since if I try a new datasource and
use "Credentials are not required" it fails, as expected. But once a
valid User Name has been used, and then the option is switched back to
"Credentials are not required", it still works.

AS connection issues

I am experiencing issues when connecting to AS from SSMS. I get the following error:

Cannot connect to InstanceName
A connection cannot be made. Ensure that the server is running. (Microsoft.AnalysisServices.AdomdClient)

I have found out that this was a known issue in before SP1. However I am already on SP2. Not sure why am I getting this error. I am able to connect to AS on the server itself but not from some other machines. Remote connections for AS are enabled.

any ideas what might be going on here?

thanks

Hi,

can you give us more information on what is the name of the server that you are trying to connect to?

what are specifying in the connection parameters in ssms?

Regards

|||

Have you read Edward Melomed's article on troubleshooting connectivity issues?

http://www.sqljunkies.com/WebLog/edwardm/archive/2006/05/26/21447.aspx

HTH,

Chris