Monday, January 12, 2009

Querying Table Data Using Visual Basic Code in Ms Access

In order to fully utilize the capabilities of MS Access, one must learn not only learn the Visual Basic (VB) programming language, but should also learn Standard Query Language (SQL). Once a grasp of these two languages have been obtained, MS Access users can begin to build faster and more efficient databases.

One tool that has proved itself very useful to me over the years is querying data from tables or queries using VB and SQL code. A brief introduction to this process is presented in this article. To best understand this process, an example is provided below along with an explanation of its parts.

‘*********CODE***********
Dim rstTemp As Recordset
Dim strSQL As String
Dim routeNum As Integer

strSQL = "SELECT [Route], [Main Route PM], [Intersecting Route], [IntBeginPM], [IntEndPM] “

strSQL = strSQL + “FROM Intersections_list WHERE (((CStr([Route])) = """ + cmbRouteQuery + """));"

Set rstTemp = CurrentDb.OpenRecordset(strSQL, dbOpenDynaset)

If (Not (rstTemp.EOF)) Then
rstTemp.MoveFirst
routeNum = rstTemp(0)

‘************************

After the initial variable declarations, the code assigns an SQL statement to the string variable strSQL. This statement directs Access to gather all the data in the Route, Main Route PM, Intersecting Route, IntBeginPM, and IntEndPM fields of the table named Intersections_list. Furthermore, it directs Access to only gather information from these fields where the Route field is equal to a value held in the combo box cmbRouteQuery.

Once the SQL statement has been set, it is passed to the next line of code which executes it. It should be noted that the dbOpenDynaset variable is built into Access and holds an integer value that changes the type of recordset to open. For most general purposes, using dbOpenDynaset will work just fine.

The “if statement” in the code example verifies that the recordset just created contains information. If information is present, the code directs Access to move to the first record in the recordset. The code then stores the route in the first record (routeNum = rstTemp(0)) in the variable routeNum to be used for later use.


Read more ...............

Create Database in Sql Server 2005, Database Statements

Following is the full syntax used for creating database in Sql Server 2005.

CREATE DATABASE database_name
[ ON [ PRIMARY ] [ < filespec >] ]
{ LOG ON [ < filespec > ] ]
< filespec > : : =
( [ NAME = logical_file_name , ]
FILENAME = 'os_file_name'
[ , SIZE = size ]
[ , MAXSIZE = { max_size | UNLIMITED } ]
[ , FILEGROWTH = growth_increment ] ) [ ,.... n ]
Description ::-


ON specifies the disk file used to store the data portion of the database.

LOG ON specifies the disk files used to store log files.
FILENAME=os_file_name specifies the operating-system file name for the file.
PRIMARY specifies the associated list that defines files in the primary filegroup.
NAME=logical_file_name specifies the logical name for the file.
MAXSIZE=max_size specifies the maxium size to which the file defined in the list can grow.
FILEGROWTH=growth_increment specifies the growth increment of the file defined in the list.
Remember - " FILEGROWTH setting for a file cannot exceed the MAXSIZE setting"

NOTE : Everything written between [ ] is optional .

But remeber that to create a database you must be a member of the dbcreator server role.

After a database is created, to check details of the database use following command :

sp_helpdb [ database_name ]

To drop a user defined database use following command:

DROP DATABASE database_name

Note: you cannot delete a system-defined database.

To rename a user-defined database use :

sp_renamedb old_database_name , new_database_name

Fortunately you can also create a database by a right click on the object explorer, Thanks to SQL SERVER Management studio 2005.

SQL SERVER 2005 contains the following system database :

1. master
2. tempdb
3. model
4. msdb
5. Resource
--------------------------------------------------------------------------------------------------------------------------------------------
If u have any query feel free to ask. If u like this post , rate & comment it.

Regards,

Anuj Tripathi

Read more ...............

Tuesday, December 30, 2008

Laptop Computer LCD Monitors

LCD monitors have become the preferred kind of monitor in the market, having higher resolutions resulting in sharper, brighter, clearer images and thus making for better viewing. There is lesser glare from LCD screen, so looking at one for a long period of time won't be too much on the eyes. Also, LCD monitors are thin and lighter than the bulky CRT monitors. A 21-inch LCD monitor will still be lighter than a 14-inch CRT one. They are therefore more convenient for handling and for use, as they don't take up so much space in a home, and can be hung on or simply pushed against a wall. And because of their weight and dimensions, you can move LCD monitors around to suit you, with the least effort.

Monitors are literally the biggest part of your computer set-up, the printer not counted. Unless of course, you have a monster of a CPU. A monitor is basically where you see everything. It's where images from your computer come out, electronically produced from the video output of your PC or laptop. Monitors are also called visual display units, and come in all sizes possible, from 12-inch to as wide as 48-inch screens. Screen measurements are determined by the distance from one corner of the monitor to another. It's through monitors that you can view pictures, watch movies, type texts, play games, browse the internet and do virtually everything else.

Older monitors made use of CRT or cathode ray tubes to project images. In recent years however, an invention called the LCD or liquid crystal display has been gaining more popularity as the monitor of choice for a lot of people. Check out the rest of Monitors.net for more information on monitors!

Widescreen monitors are fast becoming the rage, especially with those who take pleasure in having a state-of-the-art entertainment system. Widescreen monitors are also the popular choice for computer fans who enjoy, even need to be, working with vivid, large-scale images. With a widescreen monitor, images are are not just bigger, they're brighter, sharper, and overall more fun to see. Watching a movie on a widescreen monitor is almost like watching it in the movie theatre, minus the crowd. Widescreen monitors also mean less eye strain as you can look at it at eye level. Make it an LCD monitor, and you may feel like never getting off your couch again.

It's not just all about fun, either. Working with a widescreen computer monitor offers advantages such as being able see what you're doing better and allowing you to organize your virtual workspace faster, thus making your work more efficient. With widescreen monitors, you can both work and play while enjoying yourself.

Read more ...............

Asus En9800gtx Bfg 9800gx2

Where are the beasts? Where are the monolithic giants of graphical technology that make us go moist in the geek glands? Too long have we waited, frustrated at the less than satisfying make-do cards thrown our way like scraps from the table of the tech gods. AMD has tried to placate us with the vast scale of the HD3870 X2, a multi-core behemoth that demands half the space and practically all the power your PC can muster, but what of NVIDIA's top-end cards?

Just over two years ago, the much-heralded age of the DirectX 10-capable graphics card dawned with the supreme G80-powered GeForce 8800GTX. Then a year ago came the updated 8800 Ultra, a card that has remained NVIDIA's top end offering... until now. We've had to wait 12 long months for the refresh, during which we've been treated to a mass of mid-range cards. Admittedly, this included the excellent G92 8800GT; its first 65nm core, but still it's been a long time coming for the 9800GTX and GX2.

Both new cards are powered by the same 65nm G92, a core that is now one year old, and represents the first time that either AMD or NVIDIA have released a brand new family of top-end cards based on old architecture. Replacing the 8800GTX and Ultra is a necessity as far as furthering the NVIDIA brand is concerned, competition-wise though it's less of an issue. AMD still hasn't managed to create anything to seriously outperform these year-old cards. So is the lack of a new core an acknowledgment that NVIDIA only has to turn up to the race to win?

Promises, Promises

Towards the end of the year we are promised the GT200, the current nomenclature of NVIDIA's next chip, with a core designed to power the 9900 family of cards. With this in mind it was necessary for the green side of the graphics market to produce a range of cards to cover the high-end, and so the stop-gap measure of the 9800 cards have been born.

The GTX model is a straight, beefed up version of the G92 with higher clock speeds across the board. While it shares the same number of Raster Operators (ROPs) as the 8800GT, it has the old GTX's complement of shader units at 128, giving it the necessary speed boost. The GX2 follows the example of the old 7950GX2, strapping two G92-stuffed PCBs together, except this time they both face into the same heatsink, housed in a vaguely coffin-like surround. The clock speeds are slightly slower than the GTX, but a fair dose of optimizing has gone into making this single card SLI offering an impressive piece of engineering.

The first difference you'll notice when comparing the specs of the two new cards with the versions they're replacing is the change in memory capacity. Both the 8800GTX and Ultra had a 384-bit memory bus with 768MB of GDDR3, while the 98005 make do with the same 256-bit 512MB of memory that resides on the GTS and GT iterations of the G92-based 8800s.

ROP rules?

Due to its two cores the GX2 comes out tops in the memory bandwidth stakes at 128Gbps compared with the Ultra's 103.7Gbps, but the 9800GTX lags well behind the older cards. What this all means, in real terms, is that at the higher resolutions, and most especially with full screen anti-aliasing turned on, the new cards take quite a hit at the levels we were hoping these big-panel pixel pushers would excel at.

The differences between the GTX and GX2, and indeed the 8800GT, are slight; the GX2 simply relying on the brute force effect of the single card SLI factor. Where the difference between the two new G92 parts is most obvious though is the number of ROPs. The GTX is still hobbling along with 16, less than both the 8800GTX and Ultra at 24, but due to the doubling up the GX2 has 32. The difficulty is in knowing how much of a benefit this multi-CPU's extra ROPs actually gives as opposed to the single card with 24.

The question is: where do we find ourselves with the two new top-end cards? Well, mostly in the same place we were before, to be brutally honest. There's very little difference between this new set and the old, with the 9800GTX being the biggest disappointment.

Bigger, Faster, Stronger?

The 9800GX2 struggles to find any space between itself and the 8800GTX, it's supposed to be replacing, and there's also the fact that you can still pick up the older card - with the extra memory, bandwidth and ROPs - for less than $600. In some places you can save yourself around $100 and come out with an equivalent and, in some cases, faster card. The march of progress seems to have stomped right past this iteration of the 9800 without saluting.

NVIDIA then had to go down the multi-GPU route, not just to prove they could produce a functional version like AMD, but also to create a card that they could legitimately call the fastest graphics card around. Still, the memory constraints hold the GX2 back from being the superlative, stand out, top-end card de jour.

On the lower-res panels, without the silicon-melting anti-aliasing it speeds ahead of the competition, yet with all the bells and whistles cranked up to a deafening roar it struggles to break even with the old 8800 Ultra. Again, if you shop around you can pick up an Ultra for around $500, and be fairly sure that your card will have drivers mature enough to cater for whatever you throw down its tubes.

Essentially, if you've got yourself an 8800GTX or Ultra and felt that twinge of envy at the announcement of this new generation of top-end cards, then quit your worrying right now. In fact, you can probably be downright smug as your slightly geriatric cards are still more than capable of holding their own against these youngbloods. Till the GT200 that is.
Read more ...............

Enter your email address:

Delivered by FeedBurner

Blog Archive

Followers

  © Blogger templates The Professional Template by Ourblogtemplates.com 2008

Back to TOP