VS 2005 To Pass Or Not To Pass?

Apr 16, 2009

I am looking for some input. I am helping with a web application that is fairly large. We have some logic factored out into classes, not a true business logic layer (yet ). The classes are setup to pull values directly from the QueryString or Session variables and I'm not sure that that mehtod is proper or even a

The reason I would like some input is, there may be a chance to rewrite or at least refactor the code.

[Code]...

View 2 Replies


ADVERTISEMENT

VS 2005 Update Table - If All Results Is PASS Then The Table2 Should Be Updated As Pass

Jun 8, 2012

I have two tables:

table1

case_no flow result
tc_1 001 pass
tc_1 002 pass
tc_1 003 pass
tc_2 001 pass
tc_2 002 fail
tc_2 003 pass


table2"

case_no result
tc_1 pass
tc_2 fail

Table2 should be updates from table based on the results... If all results is PASS then the table2 should be updated as pass... if any result is FAIL then the entire case_no should be updates a s fail..

View 7 Replies

Sockets - VB9 .Net 3.5 (2008) Code Works On The First Pass.Then Second Pass It Just Hangs On

Jun 19, 2009

This code was working consistently, but now...This code works on the first pass.Then second pass it just hangs on Code:Dim tcpClient As TcpClient = tcpListener.AcceptTcpClient() for about 2 minutesThen the code will fork for another pass, then fail.....

Code:Imports SystemImports System.TextImports System.Collections.GenericImports System.XmlImports System.Xml.LinqImports System.Net.Sockets

[CODE]....

View 2 Replies

Pass Data To Dialog - Manipulate And Pass Back?

Jan 15, 2010

Just started VB programming this week and have found a wealth of information about what I'm trying to do. Problem is, some of it is more complete than others.Here's what I'm trying to do:In Form1 (my main form), I want to instantiate a class that contains a couple of properties (speed setpoint and position setpoint). When I click a button, I want to pass this data to Form2 and populate two textboxes on Form2 with the properties of this object. I want to manipulate the property values on Form2 and click an OK button which closes the dialog and returns the manipulated data, updating the property values of the object. Here's the algorithm I'm following:1) On Form1, instantiate the class2) On Form1's "Pass Data" button click event handler, instantiate a Form2 object and invoke the ShowDialog method, passing the object as a parameter.

3) On Form2, overload the ShowDialog method to accept the object as a parameter and modify the method so that it returns the manipulated class data.4) On Form2, in the ShowDialog method, populate the textboxes with the class data that was passed in.Here's where I get stuck. If I press the OK button on Form2 (DialogResult.OK), it returns me to Form1, but what hook do I have in Form1 to receive the manipulated class data that the ShowDialog method is returning?Here's an example of what I'm thinking about:

Code:
Public Class Form1
Dim clsController1 As New MotionController

[code].....

I'm sure it's probably a very elementary question, but every explanation I've found seems to be incomplete.

View 2 Replies

VS 2005 Pass My.Settings Object To A Sub?

Dec 17, 2009

I have a sub that I want to receive a My.Settings object. I don't know, though, which kind of object to use in the declare line of the sub. For example:[code]

View 3 Replies

Asp.net - SQL Server 2005 - Pass In Name Of Table To Be Queried Via Parameter

Jul 16, 2009

Here's the situation. Due to the design of the database I have to work with, I need to write a stored procedure in such a way that I can pass in the name of the table to be queried against if at all possible. The program in question does its processing by jobs, and each job gets its own table created in the database, IE table-jobid1, table-jobid2, table-jobid3, etc. Unfortunately, there's nothing I can do about this design - I'm stuck with it.

However, now, I need to do data mining against these individualized tables. I'd like to avoid doing the SQL in the code files at all costs if possible. Ideally, I'd like to have a stored procedure similar to:

[Code]...

Is this even possible in SQL Server 2005? Alternate ways to keep the SQL out of the code behind would be welcome too, if this isn't possible.

View 3 Replies

Pass Database Name Dynamically To Crystal Report In 2005?

Jun 10, 2011

dynamically passing image to crystal report from a disk in vb.net 2005

View 1 Replies

VS 2005 Pass The Values In The Selected Row From The Datagridview To Form?

May 15, 2009

i have a datagridview at form1 filled with 2 columns, mailName and callName. upon clicking an edit button, form2 will show with the details of the selected row in the datagridview from form1. how can i pass the values in the selected row from the datagridview to form2? my select statement at form2:

[Code]...

View 3 Replies

[2005] Pass Excel.Application Object To Shared-Addin By .Net?

Jan 22, 2009

I currently need to build a Automation Add-in for Excel. This add-in will load a recordset from Database to Excel. I would like to have function A() that I input in Cell as a formular. This function A() call a the add-in to load the data from Database to Excel. The data should be a matrix. So that means I would like to set in Excel worksheet a range of data by just calling single function in a cell. (I am sure there should be some way to implement it)As I know if I develop a shared Add-in by VB(or VB.Net) and in the add-in, I can get an Object of Excel.Application. By this Excel.Application object, I can get full control of Excel inside the Add-in. That means if I define a sub that load datamatrix from database and using the Excel.Application object I can populate the data matrix to the Excel.

I have done much research on internet and I now have built a shared Add-in for excel. I should say this add-in works fine without invoke the Excel.Application Object that I have tested. But when I call the Add-in function that invode Excel.Application Object from Excel I got an error as below:

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Run-time error '2147467262'(*)
Unable to cast object of type 'System.String' to type Excel.Application

[code]....

View 2 Replies

VS 2005 Pass A Value From An Independent Form To A Child Form?

Nov 24, 2009

how to pass a value from an Independent form to a Child form...

here whis is the data from..

the indenpendent data is selected from the datagridview by just double clicking the cell the selected data will pass into the combox of child form (Note: this is combobox not textbox)...

i'm done with textbox it work fine..

look:

Independent form when user duble click the datagridview

Private BoxToUpdate As TextBox
Public Sub Start(ByRef DescItem As TextBox)
' Me.Close()

[Code]....

how could i able the value into combobox from independent form into child form...

View 1 Replies

Pass A Value From A Sub Procedure To A Function Procedure .... Pass The Whole Subprocedure To The Function Procedure Argument?

Mar 30, 2012

Im a student doing an assignment, how do i pass the value from a sub procedure to a function procedure....i want to pass the value from decSubtotal to a function procedure named CalculateDiscount; check out my code--

[Code]...

View 1 Replies

How To Pass One Value From Another

Jul 27, 2009

But in my application i need to pass the ID of my Client (company) to fecth it's businessName. So first i've written a storedprocedure to return it's ClientID searched by BusinessName, then i pass the ClientID to fetch all the other details of the client such has his contatcs...etc....

Therefore currently i use two stored procedures to one i pass the businessName then i will return it;s ClientID then to the other i pass the ClientID then it will return everything about the client (beucase client was indexed on clientID)

Is it possible to write only one stored procedure to perform the two operations..

PS - I use SQL server 2K5

View 5 Replies

Pass A Sub To Another Sub

Dec 24, 2011

Is it possible to have

[Code]....

View 4 Replies

Asp.net - Pass Value From Javascript To Vb Sub

Feb 6, 2012

i have a javascript function in aspx file now i use vb as back in asp.net now i use postback from javascript like this

[Code]...

now i dont get that "1" in my vb code i want to get it because i want check when i get page_load event by post back by this javascript

View 2 Replies

C# - How To Pass A Value To The Code Behind Asp

Jun 8, 2011

Erm i am new to this. How do i pass the value the user enters into a text box to the vb code behind?

<input type="text" runat="server" id="amount" name="amount" size="15" />

View 2 Replies

Can't Pass Value To A Class

Nov 3, 2009

The value from the text box is not being passed to the class.[code]...

View 13 Replies

How To Pass Object As Sub

Jan 20, 2012

This code copose from Class including tow sub first sub to insert data in DB Ms access- second code: to check if there is same number of Tel if there is not same number will excute the first code insert, if there is same number of Tel it will show messagebox the problem that I faced is by how to pass object(InsertData) from CheckN sub. It showed me error : Expression is not a method

[Code3]...

View 1 Replies

How To Pass Parameters

Nov 27, 2010

If I want to use a FolderItem verb like 'Copy to folder', then I have to somehow supply the name of the folder to which I want the object copied. How is this done. I dont understand how msdn can be so minimal on examples.

View 5 Replies

How To Pass String From Vba

Mar 18, 2012

I want get a string from excel cell by vba and pass that string to vb.net function

View 1 Replies

How To Pass The File Name

Jun 8, 2010

Suppose I save a file as *.tar (this extension is my own making) using a vb6 program.Now when the user clicks this file, the window asks 'with what program to open this file' and he/she selects the exe of my program. Now I want to pass the name of file clicked to my program. Like when we click *.xls file, the exe of Excel program knows which file has been opened or clicked. Is there a way?

View 2 Replies

How To Pass The Value Between Class?

Feb 16, 2011

Can any one please tell me why the following code is not giving me the expected result Application type as Class library Form with 1 text box and 2 button

form1.vb
Public Class Form1
Private Sub button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim cl As New WindowApp.Class1

[Code]...

View 4 Replies

How To Pass The Variable

Jul 8, 2009

ok to start i know very little about VB6 but i am very good in true basic lol (stupid school teaching the wrong language -_-) anyway im just asking you to make the answer as clear as possible because i don't know very much. heres the problem . ok in the above example i have a button that (for my example) can be used to build a house (lol) i then have a variable in the button sub called money which will have 150 subtracted from it when the button is clicked my problem is it say variable not defined when using this button ... i have declared the variable in a module and in form load along with my other 50 or so variables. my question is how do i pass the variable into this sub and then send the new value back into form load so it can be sent into another sub for more calculations.

View 14 Replies

How To Pass Variable Between Sub

Jan 14, 2010

I currently have the following funcion:

Public Sub GetUserAmount(ByVal ConnectionString As String)
Dim command1Text As String = "SELECT Wager FROM Donations1 WHERE DonationId = (SELECTCOUNT (BidCountHistory) FROM BidCountHistory)"

[Code]......

View 4 Replies

How To Pass Variant* To Com In .NET

Jun 10, 2010

Function "SetUserName" is used to download the specified user's name data to the appointed terminal.

[Format]
BOOL SetUserName(
long DeviceKind,
long dwMachineNumber,
long dwEnrollNumber,

[Code]...

View 2 Replies

Pass A Type To A Sub?

Dec 19, 2011

I have the following sub which works for the type "Button". I would like to make it general by having a parameter that is assigned a type rather than "Button" being hard wired. Can this be done? How do you pass a type? I tried the parameter "ByVal t as Type" but the compiler complained when I used t as a type and I also tried inserting (Of T)but the compiler complained about CType(control,T).

how add type as an input to this sub?

Public Shared Sub Example(ctrl As Control, items As ToolStripItemCollection)
For Each control As Control In ctrl.Controls
If TypeOf control Is Button Then
Dim butt As Button = CType(control, Button)

determine which component had been clicked?

View 13 Replies

Pass A Value Between Two Asp.net Pages

May 30, 2009

I want to know what the best practice is for passing values (sometimes multiple values) between two asp.net pages

In the past I have used query strings to pass a value in asp like this:

href='<%# Eval("TestID","../Net/TestPage.aspx?TestID={0}") %>'><%#Eval("Title")%> </a>

I assume you can do this in the code behind but I do not know the best way.

I also assume it is possible to pass more than one value.

View 3 Replies

Pass A Value From One Form To Another?

Sep 15, 2009

Assuming that I have a datagridview or a listview populated by value (form 1), then here I have a command button to edit (form 2, details in text boxes) a selected record from the grid or listview, now, the edit process is done, how can I then, pass these values to datagridview from the other form (form 1) and update or refresh the grid then close the form 2 as if it is not been opened?

View 6 Replies

Pass A Value To Bat File?

Mar 24, 2009

My program opens and executes a .bat file like so.[code]...

The Top code is a work around, as .net will not run .bat files due to security resaons (unatended process)

I am facing a problem now, where I need to pass a parameter to the .bat file, but because of the way it is executed in the command prompt

View 5 Replies

Pass A Value Using Collection?

Apr 8, 2012

Passing a value through radio buttons that are in group boxes, this is a project that is upgrading an old program so I already have formulas for figuring out all the rest of the program I am just stuck with how to pass these values to the formulas.[code]...

View 3 Replies

Pass A Variable By Name?

Aug 6, 2011

I need to pass a variable by name like this

Dim html_news = "...the news ..."
Dim var = "news"
Dim a = "html_" & var
' content of that variable

How can I do that in VB.NET ?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved