his SQL statement is used on the table adapter for the datagridview1
SELECT Descrição, idEncomendado, Estado, NºSerie, Actualização, NumEnc
FROM Table_1Encomendados
WHERE NumEnc = @idEnc
but then i get this error
Error 1 Argument not specified for parameter 'idEnc' of 'Friend Overridable Overloads Function Fill(dataTable As demoDataSet2.Table_1EncomendadosDataTable, idEnc As String) As Integer'. C:\Documents and Settings\bruno.amorim\Os meus documentos\Visual Studio 2005\Projects\WindowsApplication1\WindowsApplicati on1\frmMain.vb 67 9 WindowsApplication1
on the line
Me.Table_1EncomendadosTableAdapter.Fill(Me.DemoDat aSet2.Table_1Encomendados)
idEnc is declared in a module as Friend integer
How is it possible to see the "Preview query" on the datagridview working but, whem you go to the code this error appears?
8 3965
Well, where have you defined your parameter at?
The preview query probably pops up a window for you to give the parameter a value, but that won't work in the application.
the var IdEnc is defined in a Module as Friend Integer
the var IdEnc is defined in a Module as Friend Integer
Right, but where have you actually defined the parameter? You can't just define a variable that has the same name and expect it to be the parameter.
Right, but where have you actually defined the parameter? You can't just define a variable that has the same name and expect it to be the parameter.
Then i guess , i didnt defined the parameter, can you help me out?
Then i guess , i didnt defined the parameter, can you help me out?
Post the relevant parts of your code, I'll see what I can do.
this part is where the var idEnc gets a value -
Try
-
idEnc = Dgv_Table1t.CurrentRow.Cells("IdEncomendaDataGridViewTextBoxColumn").Value
-
Cliente = Dgv_Table1t.CurrentRow.Cells(2).Value
-
Label1.Text = idEnc
-
Label2.Text = Dgv_Table1t.CurrentRow.Index
-
-
Catch ex As Exception
-
Dgv_Table1t.Select()
-
End Try
this is used to Fill data into the datagridview
a parameter cant be declared this way?
Friend update() As Integer = {"@idEnc"}
Thank you but,
it doesn't work as i wanted, but i think my point is pretty simple and i dint explained myself right
I load dataset1 into a datagridview on form1, when the program starts in form 1 , user selects one row of the table and from that selection i extract one integer value from a certain column . (example: user selected line 1 and idEnc gets value 4)
that value is then (in a Friend integer var) used to fill datagridview2 in form2 with other table WHERE some column in that table equals idEnc.
I use the value form idEnc to be displayed in some labels in form2.
Dont know if this can be done exactly in the way i explained
Post is abusive
Sign in to post your reply or Sign up for a free account.
Similar topics
by: dbuchanan |
last post by:
Hello,
I have added a query to my TableAdapter that accepts a parameter (The
ID) to filter the data. It will return only one record. I tested it in
the designer and it returns one record as...
|
by: GaryDean |
last post by:
We have been noticing that questions on vs.2005/2.0 don't appear to get much
in answers so I'm reposting some questions posted by some of the programmers
here in our organization that never got...
|
by: Mike |
last post by:
Dear Group,
When I add a DataTable to a Typed Dataset, and a TableAdapter to the
DataTable, I am able to create methods to send updates directly to the
database (GenerateDBDirectMethods),...
|
by: vbnetguy |
last post by:
Hopefully someone has an answer for this or maybe I am missing
something.
I have a stored procedure - this stored procedure is used as my main
insert for a tableadapter
I am doing something...
|
by: Crazy Cat |
last post by:
I've created a TableAdapter which implements the following SQL
statement
SELECT MSC.MSC_NAME AS NAME, Capacity.Capacity AS CAPACITY
FROM Capacity INNER JOIN
MSC ON Capacity.MSC_KEY =...
|
by: rpuertas |
last post by:
Hello,
Visual Web Developer 2005 Express Edition and SQL Server 2005 Express: I
want to run a paged query within a TableAdapter. In the TableAdapter Query
Configuration Wizard" I write the next...
|
by: =?Utf-8?B?UmljaCBIdXRjaGlucw==?= |
last post by:
I'm not really sure how to ask this question because I'm still getting my
feet wet with data access and VB.NET, but here goes:
To start off with, I'm using VB 2005 Express to connect to an Access...
|
by: jonnyc23 |
last post by:
Hi
I'm using table adapters and have managed to get them working with query parameters but I can't seem to find a way to do something like the following:
select NodeId, Time, Data
from...
|
by: Craig Buchanan |
last post by:
I created a TableAdapter (TA) in my VB 2005 project. I tested it to ensure
that its CRUD functionality is what I expected it to be.
I'm using the TA and its strongly-typed DataTable (DT) in my...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |