Click here to Skip to main content
15,920,005 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Problem while running a vb.net application in Network Pin
Dave Kreskowiak30-Jul-07 8:49
mveDave Kreskowiak30-Jul-07 8:49 
Questionplz help about the ruler Pin
eyes200730-Jul-07 5:40
eyes200730-Jul-07 5:40 
Questionkeydown event doesn't get triggerd Pin
Tom Deketelaere30-Jul-07 5:03
professionalTom Deketelaere30-Jul-07 5:03 
QuestionListView and ContextMenu Pin
Sebastian T Xavier30-Jul-07 4:27
Sebastian T Xavier30-Jul-07 4:27 
QuestionWebservice written in VB.NET Pin
microdommi30-Jul-07 4:04
microdommi30-Jul-07 4:04 
AnswerRe: Webservice written in VB.NET Pin
kubben30-Jul-07 6:43
kubben30-Jul-07 6:43 
GeneralRe: Webservice written in VB.NET Pin
microdommi30-Jul-07 10:19
microdommi30-Jul-07 10:19 
QuestionHow to Search a datagrid in SQL, VB.net Pin
Vimalsoft(Pty) Ltd30-Jul-07 3:33
professionalVimalsoft(Pty) Ltd30-Jul-07 3:33 
hi All the Following code reside on my Search Button.i want to search the results in datagrid(dataset),using the input from a textbox. and return the results if found. am usng SQl. here is the code i tried write , please help me fix this .
'Open Database Connection
        Dim strconnection As String = "workstation id=5875-049;packet size=4096;user id=***; Password=******;data source=S*******;persist security info=False;initial catalog=Tshwane_Valuations"
        Dim cn As SqlConnection = New SqlConnection(strconnection)
        cn.Open()

        'set up data adapter 
        Dim strSql As String = _
        "select Actual_Extent,Attrib_code,Lis_key,Func_key,Density," _
          & "New_Net_Usable_Extent,New_Total_Land_Factor,New_AdJ_Extent_1,New_Points_1," _
          & "New_ADJ_Extent_2, New_Points_2, LS_Prediction, LS_Confidence,LS_TYPE from Property_Mass "
        Dim da As SqlDataAdapter = New SqlDataAdapter(strSql, cn)

        'load Dataset
        Dim ds As DataSet = New DataSet
        da.Fill(ds, "Property_Summary")

        'Set up a new Data adapter Object
        strSql = "select Property_Mass.Actual_Extent,Property_Mass.Attrib_code,Property_Mass.Lis_key,Property_Mass.Func_key,Property_Mass.Density," _
       & " Property_Mass.New_Net_Usable_Extent,Property_Mass.New_Total_Land_Factor,Property_Mass.New_AdJ_Extent_1, Property_Mass.New_Points_1," _
       & " Property_Mass.New_ADJ_Extent_2, Property_Mass.New_Points_2, Property_Mass.LS_Prediction, Property_Mass.LS_Confidence, Property_Mass.LS_TYPE," _
       & " Property_Summary.Purchase_Date, Property_Summary.Purchase_Price" _
        & " from Property_Mass, Property_Summary" _
        & "where Substring(Lis_key,1,4)= ?"

        da.SelectCommand.Parameters("Lis_key").Value = txtliskeysearch.Text
        da.Fill(ds)
        If ds.Tables("Property_Mass").Rows.Count = 0 Then
            MessageBox.Show("Township not Found")
        End If

    End Sub

When i run this code it gives me an Error
An unhandled exception of type 'System.IndexOutOfRangeException' occurred in system.data.dll

Additional information: An SqlParameter with ParameterName 'Lis_key' is not contained by this SqlParameterCollection.


And points to the Following line
da.SelectCommand.Parameters("Lis_key").Value = txtliskeysearch.Text


Help
Thanks
Thanks



Vuyiswa Maseko

AnswerRe: How to Search a datagrid in SQL, VB.net Pin
penguin500030-Jul-07 10:25
penguin500030-Jul-07 10:25 
QuestionViewState Not Refreshing Pin
Brendan Vogt30-Jul-07 3:14
Brendan Vogt30-Jul-07 3:14 
AnswerRe: ViewState Not Refreshing Pin
Dave Kreskowiak30-Jul-07 9:21
mveDave Kreskowiak30-Jul-07 9:21 
Questionhaving a inner table in a dataset Pin
ajith prasath30-Jul-07 2:04
ajith prasath30-Jul-07 2:04 
AnswerRe: having a inner table in a dataset Pin
Dave Kreskowiak30-Jul-07 9:06
mveDave Kreskowiak30-Jul-07 9:06 
Questionwebbrowser control Pin
Ahmad Zaidi30-Jul-07 1:54
Ahmad Zaidi30-Jul-07 1:54 
AnswerRe: webbrowser control Pin
Dave Kreskowiak30-Jul-07 9:04
mveDave Kreskowiak30-Jul-07 9:04 
GeneralRe: webbrowser control Pin
Ahmad Zaidi30-Jul-07 22:04
Ahmad Zaidi30-Jul-07 22:04 
Questionhow to update the dataset programically to database in vb.net Pin
ajith prasath30-Jul-07 1:53
ajith prasath30-Jul-07 1:53 
AnswerRe: how to update the dataset programically to database in vb.net Pin
DanB198330-Jul-07 9:54
DanB198330-Jul-07 9:54 
Questionslider on ruler control [modified] Pin
eyes200730-Jul-07 1:11
eyes200730-Jul-07 1:11 
Questionhow to print the contents of rich text box Pin
eyes200730-Jul-07 1:09
eyes200730-Jul-07 1:09 
AnswerRe: how to print the contents of rich text box Pin
Dave Kreskowiak30-Jul-07 8:59
mveDave Kreskowiak30-Jul-07 8:59 
Questionvb.net 1.1 DataGrid Pin
A.Surendar Reddy29-Jul-07 23:03
A.Surendar Reddy29-Jul-07 23:03 
AnswerRe: vb.net 1.1 DataGrid Pin
cutequencher29-Jul-07 23:17
cutequencher29-Jul-07 23:17 
GeneralRe: vb.net 1.1 DataGrid Pin
A.Surendar Reddy31-Jul-07 1:00
A.Surendar Reddy31-Jul-07 1:00 
AnswerRe: vb.net 1.1 DataGrid Pin
Tamimi - Code30-Jul-07 1:05
Tamimi - Code30-Jul-07 1:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.