| |

VerySource

 Forgot password?
 Register
Search
View: 663|Reply: 5

How to set the query timeout in ADO_RecordsetPtr (without _ConnectionPtr)

[Copy link]

1

Threads

11

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-1-18 09:00:01
| Show all posts |Read mode
When using ADO for database programming, you need to use multiple threads to load the data of several recordset objects at the same time to improve the use of the network. Therefore, only the _RecordsetPtr record set object is used, and no corresponding _ConnectionPtr object is established. _RecordsetPtr query timeout?
Reply

Use magic Report

1

Threads

11

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

 Author| Post time: 2020-2-8 01:45:01
| Show all posts
Why didn't anyone reply ...
Reply

Use magic Report

0

Threads

36

Posts

22.00

Credits

Newbie

Rank: 1

Credits
22.00

 China

Post time: 2020-2-10 21:15:02
| Show all posts
Some attributes can be placed in the connection string
ConnectionString = "provider = SQLOLEDB; CommandTimeout = 60; ... more properties ..."
Reply

Use magic Report

1

Threads

11

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

 Author| Post time: 2020-4-20 11:00:01
| Show all posts
Is there any more detailed introduction, the connection string I used is like this:
"Driver = {SQL Server}; Server = 127.0.0.1,8000; Database = dataname; Uid = username; Pwd = password;"

I added CommandTimeout = 60; inside, there is nothing wrong, but it seems that sometimes it is not enough for 60 seconds to prompt a timeout
Reply

Use magic Report

0

Threads

36

Posts

22.00

Credits

Newbie

Rank: 1

Credits
22.00

 China

Post time: 2020-4-24 10:15:01
| Show all posts
provider = SQLOLEDB; and Driver = {SQL Server}; are connection strings in different formats!
Reply

Use magic Report

1

Threads

11

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

 Author| Post time: 2020-7-4 11:15:01
| Show all posts
Thank you深蓝旅者, I have found a more detailed description on MSDN, Connect Timeout, but I did not find CommandTimeout~, that’s all,
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list