|
|
|
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&tid=1352574]: |
0ms |
get settings: |
10ms |
get forum list: |
20ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
53ms |
get topic data: |
11ms |
get forum data: |
3ms |
get page messages: |
38ms |
get tp. blocked users: |
1ms |
| others: | 249ms |
| total: | 391ms |

| 0 / 0 |
