Pass Auto-incremented Id Through Multiple Forms?
Jun 14, 2011
Need advice on what is the best approach to get the auto incremented id to be the same on multiple forms.
Basically I am using VB .Net with SQL Server as the backend. I wrote a few stored procedures to insert data and then I am calling the stored procedures on the front end. I have 3 forms and once the first form is submitted it generates an autoID and then takes the user to 2nd form.
In the second form I have a separate insert stored procedure is there a way to grab the id that the first form generated and for it to be consistent. Or should I store it in a variable after they submit the form and then call it in the second form.
View 3 Replies
ADVERTISEMENT
Nov 14, 2011
I have a simple application for taking Customer orders and their Products. I am using Visual Studio 2008 Express Edition and MS Access 2007.My application uses multiple forms. One of the forms is an Add form from where a New Customer along with his/her details like address, phone, city, state etc can be added. Another form is for the Product Details to be added.I want to know how to retrieve a CustomerID from an MS Access 2007 database for either the newly added Customer or an existing one and insert multiple rows or records for the same CustomerID, as a Customer can order multiple products. I am using the following code for the Add button:
Private Sub cmdAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdAdd.Click
[code]......
View 1 Replies
Jun 25, 2010
create an auto incremented student no.in mysql using vb.net lyk 2006-141791
View 2 Replies
Nov 4, 2009
I have about 10 boxes on my form1 that the user will populate, I am looking for a "Best Practice solution to pass the values across to form2 and form3. Would like the user to be able to edit the value on either form and have the chnage carry over to the other forms.
View 5 Replies
Sep 15, 2011
I have a loop that creates several threads as such[code]...
View 1 Replies
Apr 2, 2009
I am creating an application and I am running 1280, 1024 Res and I want my application to be able to support any computer res. How can I do this if it is at all possible?
View 2 Replies
Jun 13, 2011
know the title seems a little bit confusing, let me explain.Let say i have 10 properties of bindingsource.The names are: bindingsource1, bindingsource2, bindingsource3, ....., bindingsource10i want to develop a code using loop for these properties..
For i = 1 to 10
//bla bla bla
Next i
[code].....
View 3 Replies
Jun 18, 2008
When I rebuild a VB.NET solution (class-lib, winforms) in VS.NET 2008 prof, the assembly-version isn't updated anymore.This i a project which i used to open in VS.NET 2005, but converted to VS.NET 2008 (no code changes, because is a ms.NET 2.0 project)I have the only following in my AssemblyInvo. vb <Assembly: AssemblyVersion("2.0.*")> Before it worked in VS.NET 2005 (when I reopened Vs and rebuilded, the assembly-version info did changed). But now when i reopen the VS.NET 2008 solution, change something, rebuild --> the assembly-version info did NOT change. Even closing vs.NET 2008 an reopen, change, rebuild --> still no changes in the assembly-version...Why doesn't work this anymore (It still works in a C# project) ? My custom-auto-update solution uses the internal versions of the dll's, exe,
View 11 Replies
Jun 16, 2011
i want to display the id value incremented by 1 in a textbox in my form but getting error in the line cv = reader("id") + 1 my code is
Imports System.Data.SqlClient
Public Class Form1
Public connection As New Data.SqlClient.SqlConnection("Data Source=AMIT-
[Code].....
View 3 Replies
Jul 18, 2012
How to maintain Zeros in incremented values ex: ECJ-00001
[Code]...
View 5 Replies
Sep 7, 2011
i want to save the values from these code wriiten below,but the value did not incremented after saving.
[Code]...
View 13 Replies
Nov 20, 2011
i need the code in vb.net for auto-resize of forms. for example i execute my project in a 14" monitor, the size of the form would be the same as the size of my monitor. now what i want to happen is if i execute my project on my other PC that has different resolution, the form would have the same size of it.
View 1 Replies
Feb 23, 2011
Im writing a program and its pulling data from a .MDB to put in a .DAT file.
Here is my while loop:
vb
database_connection()
sql = "SELECT * FROM tlalist"
[Code].....
In my database there are currently 6 rows. and only 1 row has the TLA_DAY column equal to 1, but for some reason when I look at the .DAT file it creates it outputs the result twice rather than only once.
Once JTLA_count increments it becomes "2", but the while loop still outputs as if its still equal to "1". Ive used breakpoints and the counter is incrementing fine.
View 3 Replies
Oct 25, 2010
I'm looking to pass two or more parameters to a thread in VB 2008.
The following method (modified) works fine without parameters, and my status bar gets updated very cool-y. But I can't seem to make it work with one, two or more parameters.
This is the pseudo code of what I'm thinking should happen when the button is pressed:
Private Sub Btn_Click()
Dim evaluator As New Thread(AddressOf Me.testthread(goodList, 1))
evaluator.Start()
[Code].....
View 5 Replies
Aug 15, 2011
The code i have is working fine to pass one parameter to crystal, can someone help me pass a second parameter called "line"?
[code]...
View 1 Replies
Jan 31, 2011
I want to be able to pass through multiple Latitude and Longitudes and perform calculations rather then create a different function for each
I have one static Lat/Long and then need to compare that to 7 different Lat/Long
HTML
Public Function DistanceCalc(ByVal Lat1, ByVal Lon1, ByVal Lat2, ByVal Lon2, ByVal UnitFlag)
Lat1 = 34.172801
[Code].....
View 39 Replies
May 27, 2011
Im currently diving into jquery autocomplete for the first time. To start off with, I had a .net handler calling out to a mssql db and pulling last names. That worked great.However when I try to add additional values it simply doesnt work. The code being used in the handler is as follows.
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
Dim prefixText As String = context.Request.QueryString("term")
Dim conn As SqlConnection = New SqlConnection
[code]....
I didnt include the IsReusable when posting, but that is there. why it doesnt like multiple values but will display one lone value?
** Edit ** I just looked in Firebug and it is getting a response but just not displaying it. My implementation of this is pretty simple so far, nothing to fancy.
$(function() {
$('#lastName').autocomplete
({
[code]....
View 1 Replies
May 30, 2012
On a textbox you can have auto complete but you can only have one word. Is there a way to have every word in the text box ask for auto complete?
View 7 Replies
Aug 23, 2011
Hpw can I pass multiple values from same column in a query? I am using vb.net and sql server database.
With my query an exception is generated saying that @booking_date has already been declared try a different variable....
My query is:
Dim da As New SqlDataAdapter("select * from Bookings where booking_date Between (@booking_date AND @booking_date) AND booking_time Between (@booking_time AND @bookinbg_time) AND game = " & x, con)
View 1 Replies
Jun 15, 2009
How do you pass multiple parameters to a Sub which has to be invoked?Again, I've only been coding for about 3 days so please speak as if your trying to teach a child to tie his shoe.
View 3 Replies
Feb 4, 2012
DoObj(byval this as string, byval two as string, byval three as string) I'm trying to pass multiple parameters through a thread to this sub. I have tried this:
[Code]...
View 2 Replies
Apr 9, 2010
I have the requirement to create an application that has multiple front ends developed using Windows Forms, WPF, ASP and Compact Framework Mobile Forms.I would like to be able to create a series of obejct representing the business logic and have this logic accessible from the various front ends available. My first thought was to use remoting as I'd like to be able to pass the business objects back and forth between client and server but the compact framework doesn't support remoting and also transferring a full framework business object to a compact framework business object doesn't seem possible.My next thought was to use web services but again the passing of business objects seems to be very hard to accomplish. Without doing this I would have to create individual web methods for each business operation.
Finally my next option is to use sockets and write the whole client/server logic within some classes and expose them to the UI/Business layer. My only problem with this is it is not scaleable should the number of clients increase dramatically whereas using remoting or web services I can host the solution via ASP.Net.Does anybody have an ideas on the best way forward for this or even have any input on how they would write an application that required a windows form, wpf, asp website and mobile device GUI all of which want to use the same business logic?
View 3 Replies
Sep 11, 2009
i have a dialogbox (dialog1) i will assign the input from textbox a variable to the from1 but i cant do that.the variable in form1 is Dim get_from_dbox As Long i try to assign to it from dialog1 like below it fails form1.get_from_dbox = Textbox1.Text but i can assign to textbox??like that which works well
form1.RichTextBox1.Text=Textbox1.Text I am new programing i know i am wrong .don't know where?
View 1 Replies
Sep 6, 2009
I am having trouble passing variables between forms. Ive tried many methods but none seem to work. The first method I tried was to dim a public variable on the first form and call it on the second....no success
Form 1:
Public cliCode as string
cliCode = me.tbClientcCode.text
Form 2:
dim clientCode as string = form1.clicode
or
Form 2:
dim clientCode as string
On the Form2 load event....
clientCode = form1.clicode
With method 2 I created some classes on which form 1 loads and form2 access........
Public
Class frmClient
Private db As New ClientDataContext
Public clientInstance As New BusinessLogic.classClient
Public cliCode As String
[Code] .....
View 18 Replies
Mar 23, 2011
How to pass a row of datagridview of form1 to the other form2 datagridview
View 2 Replies
Oct 3, 2011
Is this way a "right" way to pass data between two forms?[code]...
View 1 Replies
Mar 6, 2010
Code below just allow me to pass only one variable at one time..the code below show how to pass the platelabel to label3..
how can i pass 2 variable in the same time..[code]...
View 5 Replies
Nov 10, 2011
I know this should be easy but I'm either having a brain fart or I'm just more inept than I thought; probably a combination of the two.
Passing a value to a form on startup is a piece of cake, but I don't think I've ever had to do the following before in all my ooooh, 8 months of programming:
I have a main form with a button and a textbox. The button opens another form with a datagridview. What I want to do is pass the selected value from the DGV back to the textbox on the first form.[code]...
View 8 Replies
May 19, 2009
I have a small HR app.First step for user is to select the employee.I wanted a single combobox (autocomplete , drop-down), where the user can start typing either firstname lastname or nickname (these are 3 different fields in an SQL DB).At first, I would have the user check a checkbox near the combobox to select what they would be searching by (first, last, nick name), but then I thought - someone could probably help me with an example of not having to select which name type they are searching for, but just start typing and the combobox would autocomplete based on whichever name ?
View 3 Replies
May 25, 2010
I have googled high and low to find an answer to this but I must be searching wrong.I have an application which has a listview displaying some items that are stored in a SQL Compact database. I am using a second form to add new items to this list directly into the database.When the second form closes I want to call the sub in my first form to refresh the list from the database.
How can I get it to fire the form1 sub routine on the close event of form2
View 3 Replies