Silverlight COM Toolkit - Vb #

Nov 5, 2011 at 1:19 PM

Can some one write a code to connect through vb# , i am finding hard time to connect with vb1010 # neither c# working , not sure where i am wrong, the example fine connect , but when i writ my own code it deos not. 

 

Can some one tell where am i wrongi|

1 i added referecme to dll file

using System;using System.Collections.Generic;using System.Linq;using System.Net;using System.Windows.Controls;using System.Windows;using System.Windows.Navigation;using ComToolkit;using ComToolkit.Data;
namespace SilverlightApplication4{    public partial class MainPage : UserControl    {        ComToolkit.Data.AdoConnection connection;        public MainPage()        {            InitializeComponent();            ConnectionString.Text = "Provider=SQLOLEDB;Data Source=kunal;Initial Catalog=Helpdesk;User ID=sa; Password=kunal@1981;";            SqlQuery.Text = "SELECT TOP 10 * FROM tickets";        }
        private void button1_Click(object sender, RoutedEventArgs e)        {
            connection = new ComToolkit.Data.AdoConnection(ConnectionString.Text);            connection.Open();                        MessageBox.Show("Connection success!");        }    }}