accessing a field from a table?

id limit engine_size ncb tpo tpft comp
0 2000 1800 1 337 369 386
1 2000 1800 2 263 281 300
2 2000 1800 3 225 241 258
3 2000 1800 4 207 223 242
4 2000 1800 5 190 195 215
5 2000 2200 1 391 420 448
6 2000 2200 2 304 327 348
7 2000 2200 3 261 280 299
8 2000 2200 4 240 256 274
9 2000 2200 5 209 223 226
10 2000 3500 1 505 541 577
11 2000 3500 2 392 420 449
12 2000 3500 3 337 361 385
13 2000 3500 4 309 330 352
14 2000 3500 5 270 288 308
15 2000 3501 1 555 595 634
16 2000 3501 2 432 462 494
17 2000 3501 3 370 397 423
18 2000 3501 4 339 363 388
19 2000 3501 5 297 317 339
20 4000 1800 1 388 416 445
21 4000 1800 2 303 324 345
22 4000 1800 3 258 277 296
23 4000 1800 4 238 255 271
24 4000 1800 5 207 221 237

ok i have a table like the one below Classic_Car_Quote, i want the user to select the limit , the engine size, the no claims bonus and the type of coverage (Third party fire and theft, comprehensive or TPO. Ive used drop down lists and a radiolist. I want to use a label to display the result. For examle the user selects, limit = 2000, engineSize = 1800, ncb = 5, coverage = COMP

--> LabelResult.Text = 215

 Id also like to be able to do some computation with this figure, something like

Dim myInt as Integer

myInt = ....//get my that integer from my table

if (myInt > ...) ect

 

Apologies for the lameness of my question, but my head is sore from St. Patricks day festivities...

 

0
kweeveen
3/18/2008 11:02:55 AM
asp.net.getting-started 91979 articles. 4 followers. Follow

1 Replies
507 Views

Similar Articles

[PageSpeed] 7

 Hopefully you have checked out the tutorials under the Learn tab up top.

One way would be setting up a query like Select comp from RateTable WHERE id=1 AND limit=2000 AND Engine=5......."

MyComp= Sql.ExecuteScalar()

If MyComp > 200 than

Label1.Color=Red

End If 

Label1.text=MyComp

 

 


Hope That Helps
All that wander, are not lost...
What were we talkin bout
0
uncleb
3/18/2008 3:13:16 PM
Reply:

Similar Artilces:

Getting "Problem in Mapping Fragment starting at line ..." error when trying to create table mappings for table associations in ADO.NET Entity Framework
 Table A: COUNTRY_LOOKUP COUNTRY_ID   smallintclustered, unique, primary key located on PRIMARY    COUNTRY_ID TABLE B: COUNTRY_MODE_RULES CARRIER_ID    intMODE_RULE_TYPE_ID    intORIG_COUNTRY_ID    smallintDEST_COUNTRY_ID    smallint clustered, unique, primary key located on PRIMARY    CARRIER_ID, MODE_RULE_TYPE_ID, ORIG_COUNTRY_ID, DEST_COUNTRY_IDThere is a foreign key relationship from COUNTRY_MODE_RULES to COUNTRY_LOOKUPORIG_COUNTRY_IDREFERENCES .COUNTRY_LOOKUP (COUNTRY_ID)DEST_CO...

How to get Field Names of a table in MS-Access
hi frnz ,               am creating one application in that i want to get colnames of table using MS-Access if any one knows gv rep ASAP Its Urgent ,   Vinod You should use GetSchema to get schema information from your database. - Create OleDB Connection toward Access database- Get various metadata using above GetSchema; by using restrictions, you can get almost anything:  // Get all of the column information from Table1. string[] restrictions1 = new string[] { null,null, "Table1",null }; ...

what is the query to get field names of table in MS-ACCESS.
Hello guys... this is prasad.I want the query to get field names of a table in MS-ACCESS.its very urgent. pls response me.... bye prasad....happy frdship day You can access the MSysObjects table. In older versions of Access (may be in the new ones too) you have to change some permissions: Tools>Options>View>Show>System objectsTools>Security>User and group PermissionsSelect MSysObjects from object namesAdd 'Read Design' PermissionGuillermo PrinaDon't forget to click "Mark as Answer" on the post that helped you.This credits that member, earns you ...

accessing linked Access table from .net
We have an access database with a linked table to MYOB through ODBC. The MYOB table appears in access with a green dot indicating it's a linked table. In Access it all works fine. When we try to get at it through .net, it brings up DB_SEC_E_AUTH_FAILED(0x80040E4D) which as far as I can see indicates authentication failed. Any idea what is required to be able to use it from.Net? You might try this stepp0, put in admin for the username and leave the password blank (unless you specified other) Source=C:\Inetpub\wwwroot\Components\Databases\Db.m...

Get tables and fields from Informix database using VB.NET 2005
Hi, I'm relatively new to VB.NET 2005 Express, and I've managed to connect to an Informix database to display the contents of a specific table in a DataGridView. What I am struggling with is getting the table and fields names from the database, and putting the information into a TreeView so that the user can select the table in the tree, and update the grid with that selected table - but I can't seem to get it to collect the schema information. Ideally, I'd like to have the first node on the tree as the database name, followed by nodes for the table name, and the...

How to Trap Error Messages when getting data from a linked Access Table (asp2.net)
Hi, I am developing an excel import tool, where the user imports a set excel sheet and it populates it into the SQL database. Currently the structure is as follows: User selects the Excel Sheet > gets uploaded and called upload.xls > is read through an access.mdb file using a linked table referring to a named reference called Data > shows it on web page (initial check) > imports it to a temp SQL Server Table > shows it on screen, showing only unique records (ones that aren't in the system) > data is imported. It works perfectly well if the us...

Can ADO.Net query/update a MS Access database that contains table and fields that contain blank spaces and characters such as "#" in their names?????
I've recently been assigned an asp.net/MS Access project. My code works fine; however, there are table and fields in the Access database that contain blank spaces and characters such as "#" in their names. For example there is a table named "Purchase Orders" and in this table there are a few column fields with names such as "PO#" and “Customer PO#". My question: Is there some sort of wrapping method that I need to implement to allow my ADO.net objects (particularly the "OleDbDataAdapter" and the "DataRow") to accept these naming...

Create access table using sql table field
 hi friends , i need create mdb file with table and data , the data will come from sql server 2005 table , for example i have table employee table contain some fields like name mobile number and others ,, now i  need to create access mdb file with table and data , data is mobile numbers of employee(just only one field) ,  i m using ASP.net C# 2.0, plz help me yarTHANKS FOR ADVANCE     Hello Raghavendra,                          &nbs...

ADO.NET table fields pass to a VB.NET variable
Hi, please help, have a ADO.NET code. 1 Dim conn As New Data.SqlClient.SqlConnection 2 Dim sql As New Data.SqlClient.SqlCommand 3 4 conn = New Data.SqlClient.SqlConnection("Provider=SQLOLEDB.1;Password=dbsystematics;Persist Security Info=True;User ID=sa;Initial Catalog=SARS;Data Source=4G") 5 conn.Open() 6 sql = New Data.SqlClient.SqlCommand("select * from users", conn)   Then i would like to pass the values that the above ADO.NET to a variable.how?please help. JFRBPH12™ You can execute the ...

how to get table field
in my web form i want to show value from database table field. In web form I have value that is unique in target table. How to get value from another field in table by key value   are you saying you want to get the value from a database? well you will need to connect to the database on your page (through code or using an sql data source), then write a query or stored prod like select value from myTable where keyvalue = @keyvalue where @keyvalue is the value you pass into the statementPlease remember to click "Mark as Answer" on this post if it helped you. &...

accessing a table fields
Dear all, I have a seperate table and i want to show the fields of another table in this new table. Is there any hint to do it. thanks ...

how to get start with .NET
the net help people installed  to my desktop 1-microsoft visual studio .NET enterprise developer 2003 2-microsoft .NET framework 1.1 what else do i need ...???  and how can i try with some simple code in VS.Net and run it to see wat happen...????? please help If you want to develope web applications, then you'll also need IIS on your PC.  That'll require XP-Professional or Windows 2000/2003, but XP-Home edition won't allow IIS installation. As for how to get started, you can search the web for some tutorials or buy a good book on VS.  The topic is way too vast to...

Getting Start With .net
hi i'm intersted to learn asp.net (vb or delphi) . i programming with delphi6 but i'd like to tp know something about programming in internet specially with .net . i hear about microsoft.net with delphi 7 that i can programming with delphi in .net .... is it right ? what 's our opinian about it ? and better to learn Vb.Net or continu with delphi(or delphi.net) thanks. Ali Darabian I think there is some support for Delphi in .Net. However, you will find much more support from the user community if you choose a more popular language such as VB.Net or C#. Since your al...

Access to fields in a table
I am trying to access the fields in a table using Visual Basic in Web Developer .NET Start with the link below and click on SelectCommand, InsertCommand, DeleteCommand and UpdateCommand to get tbe basic of manipulating data in the database through ADO.NET.  Hope this helps. http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqldataadapter.aspxKind regards,Gift Peddie...

Web resources about - accessing a field from a table? - asp.net.getting-started

Highest Percentage Of Opera Mini Users Accessing Facebook? Macau
If you were asked to guess which country had the highest percentage of users of Opera mobile Web browser Opera Mini users accessing Facebook ...

International Users Accessing Facebook Places Through US VPN Accounts
By using a virtual private network (VPN) hosted in the United States, Facebook users from around the world are accessing Facebook Places. The ...

What are some alternatives to Yodlee for accessing bank information?
Clay Loveless , Founder, Jexy. Co-founder, Mashery. Founder, Jexy. Co-founder, Mashery.

Cloud Console - Accessing files in cloud storage for iPad on the iTunes App Store
Get Cloud Console - Accessing files in cloud storage on the App Store. See screenshots and ratings, and read customer reviews.

Meryl Streep On Accessing The Characters Within - YouTube
Meryl Streep talks about the importance of an actors work representing their ability. CONNECT WITH AFI: http://facebook.com/AmericanFilmInstitute ...

Student pleads guilty to accessing records about Frances Abbott design scholarship
The Sydney student who leaked information about a fashion school scholarship controversially awarded to the daughter of the Prime Minister has ...

Accessing a headline opinion
Accessing a headline opinion

Sharp increase in authorities accessing private data
Australian law enforcement and government agencies have sharply increased their access without warrant to vast quantities of private telephone ...

Former librarian charged with accessing student records of Frances Abbott
A former part-time librarian at a Sydney design school has been charged after she allegedly accessed student records of Prime Minister Tony Abbott's ...

Frances Abbott scholarship: Sydney woman pleads guilty to accessing Whitehouse Institute records on PM's ...
A Sydney woman who leaked the student records of Tony Abbott's daughter pleads guilty. A Sydney woman who leaked the student records of Prime ...

Resources last updated: 1/23/2016 5:19:59 AM