• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 138
  • Last Modified:

VB.NET Newbie

I have a SQLdataadapter in a class.  There are 10 functions in the class that use the dataadapter to fill datatables.  How do I set the connectiontimeout of the dataadapter to 0 for all instances of the adapter within the class, as supposed to setting it in each method?
0
suicehockey44
Asked:
suicehockey44
  • 4
  • 2
1 Solution
 
srikanthreddyn143Commented:
in the connecton string u can add Connection Timeout = 0;
0
 
suicehockey44Author Commented:
Its not working in the connection string.  On a broader level, is there a way to set a property within a class to all instantiations of that class?
0
 
srikanthreddyn143Commented:
Create a connection object and use same connection object for all instances.
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
suicehockey44Author Commented:
how do i do that?
0
 
srikanthreddyn143Commented:
Create a SqlConnection object and use it in all adapters
0
 
srikanthreddyn143Commented:
I too dnt hav much Idea. Just try it.

Create SqlConnection object globally and instantiate it at load. Use that connection object for all the adapters.
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now