Click here to Skip to main content
16,015,900 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionTab control Disable/Enable Pin
ozzyrocsdbn17-Jun-07 20:25
ozzyrocsdbn17-Jun-07 20:25 
AnswerRe: Tab control Disable/Enable Pin
Xandip17-Jun-07 20:30
Xandip17-Jun-07 20:30 
QuestionRe: Tab control Disable/Enable Pin
ozzyrocsdbn17-Jun-07 20:56
ozzyrocsdbn17-Jun-07 20:56 
AnswerRe: Tab control Disable/Enable Pin
Dave Kreskowiak18-Jun-07 1:20
mveDave Kreskowiak18-Jun-07 1:20 
QuestionSearching a Certain Column in a Datagrid VB.NET Pin
Vimalsoft(Pty) Ltd17-Jun-07 20:03
professionalVimalsoft(Pty) Ltd17-Jun-07 20:03 
AnswerRe: Searching a Certain Column in a Datagrid VB.NET Pin
Johan Hakkesteegt19-Jun-07 2:19
Johan Hakkesteegt19-Jun-07 2:19 
GeneralRe: Searching a Certain Column in a Datagrid VB.NET [modified] Pin
Vimalsoft(Pty) Ltd19-Jun-07 3:59
professionalVimalsoft(Pty) Ltd19-Jun-07 3:59 
GeneralRe: Searching a Certain Column in a Datagrid VB.NET Pin
Johan Hakkesteegt19-Jun-07 20:25
Johan Hakkesteegt19-Jun-07 20:25 
Hi Vuyiswa,

I will tell what the problem is, but I strongly advise you to take a look at this link: http://www.w3schools.com/sql/default.asp
On this website you will find a simple but free SQL tutorial. It will help you a great deal if you can see yourself what is wrong in this code, and it is invaluable if you want to develop yourself in coding.

Vuyiswamb wrote:
'Num_key' is not contained by this OleDbParameterCollection.

This is the actual problem. A little SQL 101: SQL queries a database. The query you just posted is a nice example of a simple query: SELECT certain columns FROM a table in the database. This query however will simply return everything it finds, and because we are only interested in certain data, we need to write a condition into the query. This is done by adding a so called WHERE clause at the end. In your case it would become:
SELECT ID, Lis_key, Erf_NO, Prop_Address, Own_Name, Site_Value, Num_key, Improvements_value, Improved_value FROM ValRoll WHERE Num_key = @NumKey the @ character tells the query that this is a so called parameter (a variable value). What you write after the @ character doesn't matter, it is just so that you know what value to enter there. So the first line of your code changes only slightly:
OleDbDataAdapter1.SelectCommand.Parameters("@NumKey").Value = txtnum_key.Text
In other words, the error was thrown because you tried to pass a parameter to a query that didn't contain one.

Please try this, and I strongly recommend typing in sql tutorial in Google. Wink | ;)

Johan

My advice is free, and you may get what you paid for.

GeneralRe: Searching a Certain Column in a Datagrid VB.NET Pin
Vimalsoft(Pty) Ltd19-Jun-07 21:29
professionalVimalsoft(Pty) Ltd19-Jun-07 21:29 
QuestionVista look Pin
caltech17-Jun-07 15:38
caltech17-Jun-07 15:38 
AnswerRe: Vista look Pin
Dave Kreskowiak19-Jun-07 4:11
mveDave Kreskowiak19-Jun-07 4:11 
QuestionWhere is ConnectionString? Pin
mehrdadc4817-Jun-07 9:38
mehrdadc4817-Jun-07 9:38 
AnswerRe: Where is ConnectionString? Pin
Dave Kreskowiak18-Jun-07 1:16
mveDave Kreskowiak18-Jun-07 1:16 
GeneralWorking with files.... Pin
Psycho-*Coder*-Extreme17-Jun-07 5:40
Psycho-*Coder*-Extreme17-Jun-07 5:40 
GeneralRe: Working with files.... Pin
Dave Kreskowiak17-Jun-07 6:30
mveDave Kreskowiak17-Jun-07 6:30 
GeneralRe: Working with files.... Pin
Psycho-*Coder*-Extreme17-Jun-07 6:39
Psycho-*Coder*-Extreme17-Jun-07 6:39 
GeneralRe: Working with files.... Pin
Dave Kreskowiak17-Jun-07 7:36
mveDave Kreskowiak17-Jun-07 7:36 
GeneralRe: Working with files... Pin
Psycho-*Coder*-Extreme17-Jun-07 7:59
Psycho-*Coder*-Extreme17-Jun-07 7:59 
GeneralA question Pin
Dave Sexton17-Jun-07 8:07
Dave Sexton17-Jun-07 8:07 
GeneralRe: A question Pin
Psycho-*Coder*-Extreme17-Jun-07 8:30
Psycho-*Coder*-Extreme17-Jun-07 8:30 
JokeRe: A question Pin
Dave Sexton17-Jun-07 9:13
Dave Sexton17-Jun-07 9:13 
GeneralRe: A question Pin
Psycho-*Coder*-Extreme17-Jun-07 18:17
Psycho-*Coder*-Extreme17-Jun-07 18:17 
GeneralRe: A question Pin
Colin Angus Mackay17-Jun-07 21:41
Colin Angus Mackay17-Jun-07 21:41 
GeneralRe: A question Pin
Dave Kreskowiak18-Jun-07 1:12
mveDave Kreskowiak18-Jun-07 1:12 
GeneralRe: A question Pin
Psycho-*Coder*-Extreme18-Jun-07 2:11
Psycho-*Coder*-Extreme18-Jun-07 2:11 

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.