An error occurred while preparing a query for execution against OLEDB provider

Asked By 0 points N/A Posted on -
qa-featured

Hello All,

I am posting this error message here so I can get help on this as soon as possible. Every now and then the SQL server connection to the Active Directory will crash.

I have SQL server installed on Windows server 2003. When I try to create a view in SQL with Active directory users I am getting this error message.

Any ideas why?

 

SQL Server Enterprise Manager

[Microsoft][ODBC SQL Server Driver][SQL Server]An error occurred

while preparing a query for execution against OLEDB provider

‘ADSDSOObject’.

 

SHARE
Best Answer by kevinnash
Best Answer
Best Answer
Answered By 0 points N/A #115131

An error occurred while preparing a query for execution against OLEDB provider

qa-featured

 

Yes, there was this problem once getting renowned but now it is easy to fix. Try the following and you will be fine with it. 

Add the 'MSDTC' to the registry. This must be done by adding the registry keys. If it is known, the no problems. If no, try the following:

In the key field, add  –  Key: [HKEY_LOCAL_MACHINESYSTEMCURRENTCONTROLSETSERVICESMSSQL]

Then in Value name, add  –  Value Name: DependOnService

After that, make value type to this one  –  Value Type : REG_MULTI_SZ

After that the value must be equal to MSDTC.

Cheers.

Answered By 0 points N/A #115132

An error occurred while preparing a query for execution against OLEDB provider

qa-featured

 

You can note that this error message refers to the query that contains incorrect syntax. This must have some unbalanced quotes. You can have it resolved using any of the following techniques,

·         You can use VBScript for such queries and can use single quote characters in your desired SQL statement within the string.

·         Do these steps,

o   Define the server linked (which has been used in SQL).

o   Search the LDAP names which you want to use in the query.

o   To get them, use the SELECT statement.

Login/Register to Answer

Related Questions