Storing Data From A Database Into A Variable To Perform Calulations?
Aug 23, 2011
i am trying to write a program which reads a data from the database and perform some calculations. what i am intending to do is when a user selects an item from a listbox and clicks the submit button the program, calls a function to calculate using the value stored in the database and display the result in a textbox.the problem is i cant store the data retrieved from the database into a variable so that the calculations can be done. i am using vb and microsoft sql server.can anyone tell me how do i store the data retrieved by the query into a variable.
I have data that I want to store in some type of variable where I can easily access when needed. For example I have: google.com -> This is a cool website. yahoo.com -> News website gmail.com -> Mail website
I want to be able to store those in some type of group so if I go like: get data of google.com without going through a loop.
I am using an Access database and vb.net 2010. I have created a table in the database with columns for title, datein, dateout and roomnymber. In vb.net 2010 I made a distinguished title = combobox, datein and dateout = DateTimePicker. When I click on F5, an error occurs: INSERT INTO Syntax Error in statement. [Code]
I am about to develop an application in vb.net 2010, until now I used to connect to database server to manage my data . Now i need to develope an .exe which could run in any pc, so I need somehow to store the data in a local database which is embedded to my application, I see .NET has a local database. My question is a right choice to use a local database for these kind of solutions?
other than GML (Yoyogames.com Game Maker Language), I am new to the coding world. The only "major" project I have completed using VB is a computer calculator that exactly mimics the capabilities of Windows 7's calculator. Yesterday, I began a Chatbot program for my girlfriend. Lol. I have used the instr() function to answer most of the questions or answers which are typed into the textbox1. I find this extremely troublesome because when using the instr() function you cannot say instr(textbox1.
Public Class Form1 Dim fos As String = "Foster: " Dim ash As String = "Ashley: "
I am trying to retrieve a 'tag'(Is it called that?) from an XML webpage. Once I make a post request from my vb.net app it sends a command to my online webserver and redirects me to a page that has entries that change each time. The page that im redirected to that changes each time looks something like this:
i'm working on a code that i want to start creating new classes with but i want to know if there's a more direct way to send the variables used in the form to a new class for storage.
for example i've got this on a form...
Dim ClassID As String Dim ClassName As String Dim Grade As String
[Code]....
you know? so what would be my most direct route to get this? how should i start?
i need to retrieve an image from accessdb and store it in a variable m getting an error in the following code
'this is to retrive an image from database Dim User_Pic As Byte() = DirectCast(dtUserLogin.Rows(0).Item(11), Byte())this is to store image into a variable userpicture = User_Pic userpicture is a bitmap as shown Public userpicture As bitmap
how to store multiple variables in a single one to be stored in string?I have some 5 linq variables which am trying to store in a single string...Can you tell me how should i do so?
I want to store a string variable value in the windows registry If the below is a correct statement. My.Computer. Registry. SetValue ("HKEY_ LOCAL_ MACHINESYSTEMMyKey", "Start", "ABC")i will declare a string variable Dim strvalue as String strval = InputBox("Enter a string")and now i want to insert the User given value in the Registry Key as above in place of "ABC".
I have the following code for part of an application I'm building and I need some instruction on how to store this value and carry it to the next part of the program. Private Sub dateEntryTextbox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dateEntryTextbox.TextChanged
I obfuscate exe using Eazfuscator.For two times someone deleted all files from ftp account,I suppose he got the ftp password,is it possible to got it from my app exe ?Is it enough protected ?
I have 13 variables, all called Items1, Items2, Items3 and so on. I have a combo box with items in, each time I click a button I want it so whatever is selected is stored in a variable and if the button is selected again then it stores whatever is selected in the next variable. I know all the code for selecting items in a combo box and transferring it to a variable but the problem I cannot do is the part where each time a button is clicked it stores whatever is selected in the combo box to the next variable.
I am reading data from a socket (as bytes) and storing this data in a string. Then later i need to access specific bytes within the string and do some math with them. However the bytes that I read back from the string are not what I am expecting.
I have a vb .net ArrayList that I would like to store in one field on my Ms SQL 2008 database. Is it possible to put it in and get it back out as an ArrayList? I'm guessing i need to break down the Array some how and store it as a string, then rebuild it when reading back as i dont see any datatypes for sql that are for arrays. Which is a bummer for me! edit - The ArrayList stores a set of quote ID's. There is no limit to how big it is so it could hold 1 or 1001 different ID's
i am making a project and in that getting storing and loop problems there are two fields serial no and quantity when quantity is entered serial number must be asked then only and the number of times quantity is entered that many times serial number must be asked also serial number is from to too like 1 to 6 or 1 to 5 so i have to taken 2 textboxes serialfrm and serialto to store but now the problem is that i am not able to write proper code for it either it doesn't get saved to the particular name to which both fields belong or it keeps saving without stopping.
i am generating a barimage and storing in a database i am able to create a barimage and store in a local drive but while transferring i am facing difficulties my code is
I have an Access database that has thousands of records. The fields in the database are EMPID, FIRST, LAST, JOBTYPE and PAGES. I would like to know how to loop through the database and for each individual EMPID to calculate the sum of the PAGES foreach JOBTYPE. There are four JOBTYPE's: "E", "K", "O" and "R".
In my company we use Oracle Applications. Almoust every form in these applications have a common behaviour, which is:
Whenever the forms is opened one can immediately start entering data but one can also press F7, which makes the form to enter in query-mode. You can then fill one or more forms fileds with the data you are searching for and press F8, which executes the query and returns the data into the form. The query mode can be interrupted by pressing Ctrl+Q, returning to data entry mode.
My question is if there is a way of having similar behaviour on building VB forms. I'm using VS 2010.
Can anybody help me, i am having challenges getting collections value into the database
Here is my sample code. but is not working at all rather is crashing the applications
Dim collections As New System.Enrolment.CustomerBiometricsCollection() collections = Me.PrintCaptureWizard1.ShowDialog() Dim dbs As New DBClass Dim mee As String mee = dbs.ConnectionString Dim conn As New SqlClient.SqlConnection(mee) conn.Open() Dim ds As New SqlCommand("Custoon", conn) ds.CommandType = CommandType.StoredProcedure ds.CommandText = "CustBiometrics" For k As Integer = 0 To collections.Count - 1 ds.Parameters.Add("@TemplateID", SqlDbType.UniqueIdentifier).Value = New Guid(TextBox1.Text) ds.Parameters.Add("@TemplateIdentifierID", SqlDbType.UniqueIdentifier).Value = (collections(0).TemplateId) ds.Parameters.Add("@CustomerID", SqlDbType.UniqueIdentifier).Value = New Guid(id) ds.Parameters.Add("@Template", SqlDbType.Image).Value = collections(0).PrintTemplate ds.Parameters.Add("@TemplateSize", SqlDbType.Int).Value = collections(0).Size Dim dr As SqlDataReader = ds.ExecuteReader() dr.Close() Next k conn.Close() MessageBox.Show("Record Inserted")
Here is the code I used to store an image in my database (SQL Server 2008 R2) using VB 2010. The images get stored but the problem is the clarity of the image is lost when retrieved and seen in a picture box.
Public Function InsertUpdateImage(ByRef _SqlConnection As System.Data.SqlClient.SqlConnection, ByVal _Image As System.Drawing.Image, ByVal _ImageFormat As System.Drawing.Imaging.ImageFormat) As Integer