Forum Discussion

whuang's avatar
whuang
Regular Contributor
3 years ago
Solved

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

  • 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.

     

3 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    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.

     

    • whuang's avatar
      whuang
      Regular Contributor

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