I am trying to run the following SQL pass thru query from MS Access 2002:
Connection failed:
SQL State: 28000
SQL Server Error: 18456
Login failed for user 'pc3565k'
But, if I cancel out of the code and then immediately execute the same query, it runs fine.
AND, if I run the code from a different login, it runs fine.
AND, the following nearly identical piece of code runs fine regardless of login:
What's going on????
She Through Whom All Data Flows
This fails on the db.execute line, with errorstrSQL = "ALTER VIEW [dbo].[DemandHistoryNormalizedRefresh2] AS" & strSQL
--1st: rewrite DemandHistoryNormalizedRefresh1
DB.QueryDefs("DemandHistoryNormalizedRefresh1").SQL = strSQL
--2nd: Execute DemandHistoryNormalizedRefresh1 to rewrite view DemandHistoryNormalizedRefresh2 in Sql server
DB.Execute "DemandHistoryNormalizedRefresh1", dbFailOnError
Connection failed:
SQL State: 28000
SQL Server Error: 18456
Login failed for user 'pc3565k'
But, if I cancel out of the code and then immediately execute the same query, it runs fine.
AND, if I run the code from a different login, it runs fine.
AND, the following nearly identical piece of code runs fine regardless of login:
The connection strings for these two queries are identical, from what I can view in the access query properties box.strSQL = "ALTER VIEW [dbo].[ForecastNormalizedRefresh2] AS" & strSQL
--1st: rewrite ForecastNormalizedRefresh1
DB.QueryDefs("ForecastNormalizedRefresh1").SQL = strSQL
--2nd: Execute ForecastNormalizedRefresh1 to rewrite view ForecastNormalizedRefresh2 in Sql server
DB.Execute "forecastnormalizedrefresh1", dbFailOnError
What's going on????
She Through Whom All Data Flows