Click here to Skip to main content
15,917,808 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Problem with updating database Pin
Dave Kreskowiak30-Aug-07 11:44
mveDave Kreskowiak30-Aug-07 11:44 
GeneralRe: Problem with updating database [modified] Pin
Cory Kimble31-Aug-07 3:29
Cory Kimble31-Aug-07 3:29 
GeneralRe: Problem with updating database Pin
Dave Kreskowiak1-Sep-07 4:12
mveDave Kreskowiak1-Sep-07 4:12 
QuestionAPI Pin
balakpn28-Aug-07 3:01
balakpn28-Aug-07 3:01 
AnswerRe: API Pin
Dave Kreskowiak28-Aug-07 14:42
mveDave Kreskowiak28-Aug-07 14:42 
GeneralRe: API Pin
balakpn28-Aug-07 19:18
balakpn28-Aug-07 19:18 
QuestionOleDbCommand.Prepare method requires all variable length parameters to have an explicitly set non-zero Size. Pin
Vimalsoft(Pty) Ltd28-Aug-07 1:48
professionalVimalsoft(Pty) Ltd28-Aug-07 1:48 
AnswerRe: OleDbCommand.Prepare method requires all variable length parameters to have an explicitly set non-zero Size. Pin
Vimalsoft(Pty) Ltd28-Aug-07 5:46
professionalVimalsoft(Pty) Ltd28-Aug-07 5:46 
Am replying to my POst, i have post this same thread in other Forum on the Net and i found that Access(Ole) does not support "substring", i replaced substring with the "mid" function and my adapter was perfectly created. Now from the above query in my adapter i have changed it to
SELECT Actual_Extent, Compl_Boundary_Area, Boundary_Area, Current_Values, Extension, Improved_Value, First_Prop_Address, Improvements_Value, Lis_key, Num_key, Own_Name, Parcel_No, Parcel_Portion_No, Primary_ID, Prop_Address, Purchase_Date, Site_Value, Street_Name, Street_No, Title_Deed_No, Values_Effective FROM Property_ValRoll WHERE (Boundary_Area = ?) AND (MID(Lis_key, 5, 5) = ?)


And now i have a Search button that will search the grid from a selection in the combobox and textbox. here is the code.
Dim strErrorMsg As String
        Dim strerror As System.Data.SqlClient.SqlError
        Try

            damixed.SelectCommand.Parameters("Boundary_Area").Value = cmbboundary.Text
            damixed.SelectCommand.Parameters("Lis_key").Value = txterf.Text

            damixed.Fill(Dsmixed)
            If Dsmixed.Tables("Property_ValRoll").Rows.Count = 0 Then
                MessageBox.Show("Township was not found")
            Else
                Dsmixed.Clear()
                damixed.Fill(Dsmixed)
                DataGrid1.DataSource = Dsmixed
            End If
        Catch ExSQL As System.Data.SqlClient.SqlException
            ''''All this will trap all data Problems and Network if available
            For Each strerror In ExSQL.Errors
            Next
            Select Case strerror.Number
                Case 17
                    strErrorMsg = "Missing server"
                Case 4060
                    strErrorMsg = "Missing database"
                Case 18456
                    strErrorMsg = "Missing user name or password"
                Case Else
                    strErrorMsg = strerror.Message
            End Select
            MessageBox.Show(strErrorMsg, "SQL Server Error: " & strerror.Number, MessageBoxButtons.OK, MessageBoxIcon.Error)

        Catch ExcpInvOp As System.InvalidOperationException

            MessageBox.Show("Close the connection first!", "Invalid Operation", MessageBoxButtons.OK, MessageBoxIcon.Error)

        Catch Excp As System.Exception ' generic exception handler

            MessageBox.Show(Excp.Message, "Unexpected Exception", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End Try

When i try to search inserting anput into the textbox , i get the following Error
An OleDBParameter with Parametername 'Lis_key' is Not Containt by this OleDBParameterCollection

i have declared a separate adapter for the combobox "cmbboundary" ,with the following code in it.
SELECT DISTINCT Boundary_Area FROM Property_ValRoll ORDER BY Boundary_Area


What is Wrong with the Parameter that is complaining about
Confused | :confused:

Vuyiswa Maseko,

Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding

Question(VB6.0)validating a textbox for MM/dd/yyyy format Pin
venkata lakshmi prasanna28-Aug-07 1:16
venkata lakshmi prasanna28-Aug-07 1:16 
AnswerRe: (VB6.0)validating a textbox for MM/dd/yyyy format Pin
Burnsys228-Aug-07 2:03
Burnsys228-Aug-07 2:03 
QuestionRemote connection to SQL Server Pin
raaman28-Aug-07 1:05
raaman28-Aug-07 1:05 
AnswerRe: Remote connection to SQL Server Pin
originSH28-Aug-07 1:33
originSH28-Aug-07 1:33 
AnswerRe: Remote connection to SQL Server Pin
Burnsys228-Aug-07 2:06
Burnsys228-Aug-07 2:06 
GeneralRe: Remote connection to SQL Server Pin
raaman28-Aug-07 17:15
raaman28-Aug-07 17:15 
GeneralRe: Remote connection to SQL Server [modified] Pin
Burnsys229-Aug-07 4:09
Burnsys229-Aug-07 4:09 
GeneralRe: Remote connection to SQL Server Pin
raaman29-Aug-07 17:25
raaman29-Aug-07 17:25 
QuestionOffice Automation Pin
Salman Sheikh28-Aug-07 0:13
Salman Sheikh28-Aug-07 0:13 
AnswerRe: Office Automation Pin
Johan Hakkesteegt29-Aug-07 23:47
Johan Hakkesteegt29-Aug-07 23:47 
QuestionHelp in VB.NET Pin
Oguash27-Aug-07 23:30
Oguash27-Aug-07 23:30 
AnswerRe: Help in VB.NET Pin
Christian Graus28-Aug-07 1:53
protectorChristian Graus28-Aug-07 1:53 
QuestionDelete single line in VB 2005 Pin
Mekong River27-Aug-07 22:12
Mekong River27-Aug-07 22:12 
AnswerRe: Delete single line in VB 2005 Pin
The ANZAC28-Aug-07 0:21
The ANZAC28-Aug-07 0:21 
Questionimporting csv file in microsoft office spreadsheet 11 control using vb.net [modified] Pin
babusat27-Aug-07 21:13
babusat27-Aug-07 21:13 
QuestionDelete Row on DataGridView Pin
ryan11727-Aug-07 20:50
ryan11727-Aug-07 20:50 
AnswerRe: Delete Row on DataGridView Pin
Dave Kreskowiak28-Aug-07 14:43
mveDave Kreskowiak28-Aug-07 14:43 

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.