PC Review


Reply
Thread Tools Rate Thread

asynchron querytable refreshing

 
 
=?Utf-8?B?bWFyY2VsbA==?=
Guest
Posts: n/a
 
      16th Oct 2007
dear all, my problem is the following:
i'm developping an excel 2007 managed addin but this code segment doesn't
work in an asynchron way ( copied from ThisAddIn class ) :

Dim i_sheet As Worksheet = Me.Application.ActiveWorkbook.ActiveSheet

Try
Dim i_cstring As String = "OLEDB;" &
_editor.cb_sources.ComboBox.SelectedValue
_ActiveQueryTable = i_sheet.QueryTables.Add(i_cstring,
i_sheet.Range("A1"), p_commandText)
_ActiveQueryTable.CommandType = XlCmdType.xlCmdSql
_ActiveQueryTable.BackgroundQuery = True
_ActiveQueryTable.Refresh()

Catch ex As Exception
MsgBox(ex.Message)
End Try

it works fine but the application (excel) doesn't remain responsive, have to
wait till the db sends back the resultset. Could somebody help me?
thanks in advance,
m
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Q] Receiving asynchron datas with Sockets =?ISO-8859-1?Q?Andr=E9_Betz?= Microsoft C# .NET 1 6th Apr 2005 12:35 PM
[Q] EndReceive Asynchron C# Socket Andre Microsoft C# .NET 1 21st Dec 2004 11:28 AM
Querytable refreshing on a protected spreadsheet =?Utf-8?B?Q0RDb25zdWx0YW50?= Microsoft Excel Programming 1 8th Dec 2004 10:39 PM
asynchron serversocket Peter Schumacher Microsoft Dot NET Framework 1 22nd Dec 2003 04:25 PM
QueryTable jp Microsoft Excel Discussion 0 25th Jul 2003 08:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:38 PM.