Type is not defined: 'SQLDataSetCommand'

G

Guest

<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SQL" %>
Sub SubmitBtn_Click(Sender As Object, E As EventArgs)
Dim DS As DataSet
Dim MyConnection As SQLConnection
Dim MyCommand As SQLDataSetCommand
MyConnection = New SQLConnection("server=localhost;uid=sa;pwd=;database=pubs")
MyCommand = New SQLDataSetCommand("select * from Titles where type='" +
Category.SelectedItem.Value + "'", myConnection)
DS = new DataSet()
MyCommand.FillDataSet(DS, "Titles")
MyList.DataSource = DS.Tables("Titles").DefaultView
MyList.DataBind()


I just got a aspx page, but getting this error

Compiler Error Message: BC30002: Type is not defined: 'SQLDataSetCommand'

What's problem happened ? and I am using framwoek 1.0 version 1.0.3705, not
good for it ?

Thanks help !
 
R

Ron Allen

j,
You want an SqlCommand there as there isn't an SqlDataSetCommand.

Ron Allen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top