|
|
|
Data Binding inVSTO
|
|||
|---|---|---|---|
|
#18+
Пытаюсь отобразить данные в Excel без использования Wizard и пока не получается :-( SqlConnection nwindConn = new SqlConnection("Data Source=192.168.225.1;Integrated Security=SSPI;Initial Catalog=MyDB"); nwindConn.Open(); SqlDataAdapter sql = new SqlDataAdapter(myQuery, nwindConn); DataSet ds = new DataSet(); sql.Fill(ds); BindingSource bs1 = new BindingSource(); Microsoft.Office.Tools.Excel.ListObject myListObject = this.Controls.AddListObject(this.Range["A1", "C1"], "myListObject"); bs1.DataSource = ds; myListObject.SetDataBinding(bs1); // <-- На этом этапе Binding Exception myListObject.Disconnect(); ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 16.10.2007, 13:52 |
|
||
|
Data Binding inVSTO
|
|||
|---|---|---|---|
|
#18+
schwerinerПытаюсь отобразить данные в Excel без использования Wizard и пока не получается :-( SqlConnection nwindConn = new SqlConnection("Data Source=192.168.225.1;Integrated Security=SSPI;Initial Catalog=MyDB"); nwindConn.Open(); SqlDataAdapter sql = new SqlDataAdapter(myQuery, nwindConn); DataSet ds = new DataSet(); sql.Fill(ds); BindingSource bs1 = new BindingSource(); Microsoft.Office.Tools.Excel.ListObject myListObject = this.Controls.AddListObject(this.Range["A1", "C1"], "myListObject"); bs1.DataSource = ds; myListObject.SetDataBinding(bs1); // <-- На этом этапе Binding Exception myListObject.Disconnect(); Подскажите что надо исправить... может принцип другой? Спасибо. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 16.10.2007, 13:53 |
|
||
|
|

start [/forum/search_topic.php?author=himmler&author_mode=last_posts&do_search=1]: |
0ms |
get settings: |
5ms |
get forum list: |
9ms |
get settings: |
6ms |
get forum list: |
8ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
13ms |
get topic data: |
6ms |
get forum data: |
1ms |
get page messages: |
17ms |
get tp. blocked users: |
1ms |
| others: | 432ms |
| total: | 502ms |

| 0 / 0 |
