|
-
Aug 6th, 2006, 12:47 PM
#1
Thread Starter
Junior Member
SQL Server timeout
hi guys,
before i come to my problem, ill let you know my app architecture.
i have a vb program to update my sql server database which is located at hosting company.
the program will transfer every rows in Excel on local pc to MSSQL table on server.
the problem is, it takes too long to complete the transaction because it involves thousands of rows (up to 10000). when i try, it only can execute 800 rows and the connection will break.
do you have any idea to overcome this...
is there anything to do with
1. connection speed
2. sql statement
3. architecture itself
4. is it possible to execute 10000 rows over the net?
5. do i have to have the SQL Server on local so that the journey can be faster?
please give me some idea....
-
Aug 6th, 2006, 02:22 PM
#2
Re: SQL Server timeout
Easiest and most stable way to do an import of Excel to SQL Server is to use DTS Import. You can designate the Excel file and destination table and save the package. Then execute it manually or via a Job or code etc.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Aug 6th, 2006, 02:32 PM
#3
Thread Starter
Junior Member
Re: SQL Server timeout
thanks dude,
ill look at DTS first and come back later...
-
Aug 6th, 2006, 02:51 PM
#4
Re: SQL Server timeout
DTS is only going to be effective if it's run on the server (as it's designed to).....
Apart from that.... when you create your command object, you can also set the CommandTimeout property. By default it is about 30 seconds (If I remember right). You can extend it by setting it to a new value (in number of seconds)... we use 300 (which is 5 minutes) which seems to work for us.
-tg
OG Tay sez: OW! Not the face! Not the face!
-
Aug 6th, 2006, 02:59 PM
#5
Re: SQL Server timeout
Good suggestion TG as I see his db is located at hosting company so increasing the timeout property is the better way to go.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Aug 6th, 2006, 03:30 PM
#6
Re: SQL Server timeout
Post #4.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Aug 6th, 2006, 03:34 PM
#7
Thread Starter
Junior Member
Re: SQL Server timeout
i now try with new value...3000 is that enough for 10000 rows?
command timeout means attemp to execute one sql right?
am i too greedy?
Last edited by hellilyntax; Aug 6th, 2006 at 03:40 PM.
-
Aug 6th, 2006, 03:43 PM
#8
Re: SQL Server timeout
The unit is seconds and there is no formula for a row per second value. It varies as according to connection speed, traffic, server loads, etc.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Aug 6th, 2006, 03:47 PM
#9
Thread Starter
Junior Member
Re: SQL Server timeout
when i put 3000sec does it means server will wait for any command for 3000sec. if no command wthin that period, it will break the connection.
-or-
the server only provide 3000sec to complete all command.after that it will terminate the connection.
which one is right? correct me if im wrong....
fyi, currently the process took about 1sec per row and reach 1000 rows with constant speed...
damn, it breaks at 1133 rows....i want to sleep right now...
if you have othe idea...help me please...
Last edited by hellilyntax; Aug 6th, 2006 at 04:01 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|