SQL Beginners Problem !

May 20, 2004

*** edited by: master4eva ***


Please enclose your code in < code ></ code> tags (without the spaces). This will make your code easier to read online; therefore, encouraging a response to be faster. It is to your own benefit for your question to be answered in future.





I have already done the editing to include the < code ></ code> tags for this post.


*********





Hi,


I am following tutorials in a book to try and implememnt a basic select query using SQL.


However i am following all the instructions, which includes entering this header:





<%@ Page Language="VB" Explicit="True" Debug="True" %>


<%@ import Namespace="System.Data" %>


<%@ import Namespace="System.Data.SqlClient" %>





Then i am dragging a data grid onto my form, constructing a select query in query builder, however the resultamt code i get is totally different than the one in book.


The ideal poutcome refers to the SQL client, SQL reader etc, however in my code below, there is NO mention of SQL at all...simply dbconnection, IDatareader.





can anyone help me out here..I know it's probably soemthing simple.but I'm stumped, and I've followed everything in the book.





H





Function Page_Load() As System.Data.IDataReader


Dim connectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0; Ole DB Services=-4; Data Source=F:My Documents"& _


"shopping.mdb"


Dim dbConnection As System.Data.IDbConnection = New System.Data.OleDb.OleDbConnection(connectionString)





Dim queryString As String = "SELECT [Product].* FROM [Product]"


Dim dbCommand As System.Data.IDbCommand = New System.Data.OleDb.OleDbCommand


dbCommand.CommandText = queryString


dbCommand.Connection = dbConnection





dbConnection.Open


Dim dataReader As System.Data.IDataReader = dbCommand.ExecuteReader(System.Data.CommandBehavior.CloseConnection)





Return dataReader


End Function

View 1 Replies


ADVERTISEMENT

Please Help Beginners

Oct 19, 2005

The followong statement is working

iif ([Measures].[Docsum]>500, "1","0")

But there is a need to count these Docsums
so
iif ([Measures].[Docsum]>500, Count[Docsum],"0")

but not this way
Can somebody help and explains, how to Count these sums
Thank's

View 1 Replies View Related

Beginners

Sep 13, 2006

I have just started learning SQL server. Where from I start. I have downloaded SQL Management Studio & SQL Express Edition.

Now What should I do now ?

View 3 Replies View Related

DTS - Beginners Guide

Mar 22, 2001

I have "played" with DTS packages but I am now trying to do the following in an ActiveX VB script

Open a connection to database/table <---- Can't find how to do this!
Read a record from the table
Alter the content based on some rules
Post the record back to the table

Simple eh? If anyone has any examples or can point me to a good source of examples.

Many Thanks.

Geoff.

View 3 Replies View Related

Triggers For Beginners

Mar 30, 1999

Hi all,

I have just started getting stuck in to SQL Server and have a silly question - i cannot find an example trigger anywhere for

UPDATE
INSERT
DELETE

I know i can use the insered or deleted tables, but my TSQL doesn't seem to work.

Any assistance (in the form of an exmaple!) would be greatly appreciated.

Thanks in advance

Simon

View 3 Replies View Related

MS SQL Setup For Beginners

May 28, 2004

:) Hi dear fellow members,

I am a newbie to MS SQL. I already completed the installations on the SERVER side and CLIENT side. I have an inventory database in Ms Access that I want to transfer into MS SQL SERVER 2000. Is there anybody who can help me how to do it?

I would be very thankful to anybody who can help like me
who is new to SQL

Regards.

BOBOY PONCE

View 1 Replies View Related

Beginners Question

Jul 23, 2005

This is probably straight forward, but let's see:Say I have a Family which includes an address field table and a relatedFamilyMembers table which includes an age field.I need to output a report on each Family where there is at least onefamily member with an age over 16.Any help gratefully received!

View 4 Replies View Related

Queries Used In Vîdeo For Beginners

Aug 21, 2007

Hi,

I just installed reporting services and now starting with the video tutorial for reporting services(http://msdn2.microsoft.com/en-us/express/aa718391.aspx)
In Video 10 and 11 some queries are used to demonstrate building reports. I would like to repeat the steps in the video but I need the SQL Queries used in those videos.

Does anyone have any idea where I can download those SQL queries in order to programm the same reports as shown in the videos?

Many thanks for your replies and best regards from Switzerland

Chris

View 1 Replies View Related

Resources For ABSOLUTE Beginners

Jan 26, 2007

Seems to me like microsoft mentions learning, but it's never for beginners. I haven't found a single tutorial that says how to make a simple database step by step.

Does anybody know about a tutorial focused on teaching the very basics (a kind of "hello world" application) from setting up the new database with a few sample fields to "deploying" it (making it ready to be used)?

Please let me know.

Once I'm through with these first steps there seems to be a lot of helpful learning resources meant for experienced and expert users, but I'm not there yet...



Thanks,

Bernardo

View 2 Replies View Related

Books For Sql Server Development Beginners

Dec 22, 2007

Hi,

Can anyone suggest me good books for learning sql server development ie stored procedures etc..

View 1 Replies View Related

Connect To SQL Server 2000 With VB.NET For Beginners

Sep 4, 2006

I just started to learn Visual Basic 2005.NET. I have experience with VBA in Access and SQL Server.
I
now want to build applications (client/server) with VB & SQL
Server. Does anyone have a simple example with which I can start
learning?

Thank you in advance!

View 4 Replies View Related

Can't Play Files: Video Series: SQL Server 2005 Express Edition For Beginners

Apr 20, 2006

I cannot play any of these video files in RealPlayer or in Windows Media Player. Any suggestions? Anyone else having this problem?

Thanks,

Brian

Video Series: SQL Server 2005 Express Edition for Beginners

C00D1199: Cannot play the file

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved