473,382 Members | 1,814 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

result of a sql query to variable

103 100+
i have a code


code:vb 6.0

rs.Open "Select whours From empdetail Where name = '" & ListView1.SelectedItem & "' ", conn, adOpenStatic, adLockOptimistic


* txtoh.Text = Val(txthrs.Text - 8)
txtotamt.Text = Val(Form2.txtoh * Form2.txtotrt)

howw to assign the query and send to the * marked statement into the variable as "txthrs" for calculation
Dec 17 '07 #1
3 1597
debasisdas
8,127 Expert 4TB
You need to try like this

Expand|Select|Wrap|Line Numbers
  1. txthrs.text=rs(0)
  2. * txtoh.Text = Val(txthrs.Text - 8)
  3. txtotamt.Text = Val(Form2.txtoh * Form2.txtotrt)
  4.  
Dec 17 '07 #2
Vbbeginner07
103 100+
Thanks It Worked!!!!!!!!!!!!!!!!!!1
Dec 18 '07 #3
debasisdas
8,127 Expert 4TB
Thanks It Worked!!!!!!!!!!!!!!!!!!1
I am really happy that I could help you solve your problem.
Dec 18 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Felix | last post by:
Hi, I've a problem: I want to have the result of my Mysql Query in a Table in my php file. Now I've this: <?
13
by: dogu | last post by:
Noob alert. Code is below. File is saved as a .php. What I'm trying to do: User uses 'select' box drop down list to pick a value. Value ($site) is derived from a db query. This works fine....
1
by: Adrian | last post by:
Sorry if this appears twice but 6 hours and wasn't up there! "Adrian" <Adrian@nospamhotmail.com.uk> wrote in message news:... > Hi > Is it possible and if so how to do the following? > > I...
4
by: Bob Bedford | last post by:
We have no access to a mysql NG on my provider's server, so we ask here: We have a long query (long in text) with a UNION between 2 select. We have been informed that some times the query...
9
by: Petr Vileta | last post by:
Hi, I'm new here and excuse me if this question was be here earlier. I have a simple code <html><body> <?php <?php $link = mysql_connect("localhost", "user", "password") or die("Grr: " ....
10
by: Tony K | last post by:
How would I assign the result of a SQL query to a variable. The result of the following statement will ALWAYS result in 1 row returned. SELECT ProductDescription, ProductID FROM ...
4
by: meendar | last post by:
Hi to all, I just need to get two fields from a table and manipulate the results in next query of a procedure.I planned to code like what you see below, create procedure marks1 as @ sql1 as...
5
by: th1982 | last post by:
HI All I have a search page' s result which view 3results/per page,but my "next" link to view next page is not working. Here is my code : <?php // Get the search variable from URL ...
4
by: hecon | last post by:
I have a php script running querying my database table. it works fine and returns a url from the table see code: <? include 'config_inc.php'; include 'error_inc.php'; include 'results_inc.php';...
9
by: JRough | last post by:
I tried to pass the $result from a mysql_query in a url like this line Header("Location:clm_historyXL.php?_result=".$result); but on the redirect location clm_history.php page I get an error on...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.