Ask a Question

Got "Incorrect syntax near 'NULLDROP'" when trying to connect to DB

SOLVED
whuang
Regular Contributor

Got "Incorrect syntax near 'NULLDROP'" when trying to connect to DB

Hi there,

 

I got error "Incorrect syntax near 'NULLDROP'" when my codes were trying to run DBConnection.Open

I have verified my code works when the query is quick, it only failed because this specific query was taking about 30 secs to return results. Does anyone know how I can fix this issue? Thanks in advance!

 

Set DBConnection = ADO.CreateADOQuery
DBConnection.ConnectionString = xxxxxxxxxxxx
DBConnection.SQL = QueryToRun
DBConnection.Open

1 ACCEPTED SOLUTION

Accepted Solutions
AlexKaras
Community Hero

Re: Got "Incorrect syntax near 'NULLDROP'" when trying to connect to DB

Hi,

 

If I remember it right, pure ADO has a property named like Timeout. Try to check if it is provided by the ADO object in TestComplete.

If it is not, double-check with ADO documentation on MS site if my memory is correct and consider to port your code from TestComplete's ADO object to pure native ADO.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

3 REPLIES 3
AlexKaras
Community Hero

Re: Got "Incorrect syntax near 'NULLDROP'" when trying to connect to DB

Hi,

 

If I remember it right, pure ADO has a property named like Timeout. Try to check if it is provided by the ADO object in TestComplete.

If it is not, double-check with ADO documentation on MS site if my memory is correct and consider to port your code from TestComplete's ADO object to pure native ADO.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

sonya_m
Community Manager

Re: Got "Incorrect syntax near 'NULLDROP'" when trying to connect to DB

Thank you, Alex!

 

@whuang does this help?


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
whuang
Regular Contributor

Re: Got "Incorrect syntax near 'NULLDROP'" when trying to connect to DB

Thanks for the help. It actually turns out the issue was in my query, my script was fine.

cancel
Showing results for 
Search instead for 
Did you mean: