|
|
|
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/topic.php?fid=17&fpage=90&tid=1352574]: |
0ms |
get settings: |
9ms |
get forum list: |
19ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
69ms |
get topic data: |
13ms |
get forum data: |
3ms |
get page messages: |
41ms |
get tp. blocked users: |
2ms |
| others: | 240ms |
| total: | 404ms |

| 0 / 0 |
