Showing posts with label learning. Show all posts
Showing posts with label learning. Show all posts

Thursday, March 8, 2012

BUG in Microsoft Learning Resources VB Express Lesson 9 (Database Fails to Update).

I recently downloaded Visual Studio 2005 Express along with the Learning Resources for Visual Basic Express video. First let me say that the Learning Resources is an excellent resource for beginners to become familiar with Visual Studio, Database and programming concepts. Although the series is probably too basic for experienced developers you may find it reveals a number of tricks in the Visual Studio 2005 interface.

http://msdn.microsoft.com/vstudio/express/vb/default.aspx

Problem

I downloaded the VB Lesson 9 Visual Basic Project from Microsoft Learning Resources. With out making any changes to the project I compiled and ran it, making changes to the data and saving the changes. Every thing look great until you run it a second time and see that the changes to the data are all lost.

Observations:

1. Changes made to the data from within Visual Studio (Show Table Data) do take effect.

2. The in-memory data (DataSet) is changed as you move from row to row.

3. The TableAdapter.Update call returns 1, ostensibly indicating the number of rows updated.

4. The data in the database is not changed by the TableAdapter.Update call.

Operating System: Windows XP Pro Service Pack 2

Other Software installed on this system

20SQL Server 2005 Express

Visual Web Developer 2005 Express

Visual Studio 6.0 Enterprise

Visual Studio .net Enterprise

Microsoft .NET Framework SDK

Microsoft Office 2003

If anyone can help me understand the cause of this problem I would greatly appreciate it.

Thanks

Bob

Allow Nulls is a problem for Edit - Update

I have found the if you leave the Allow Nulls for any fields the Update will not work.

If any knows of a way to leave the Allow Nulls on some fields and have the Update work please let me know.

Thanks

Bob

Monday, February 13, 2012

Brand New to SQL and Programing

Hi Everyone

I am learning SQL using the "Trial by Fire" method.

The program is based on Pascal and SQL. The database responds to SQL statements. This is a propriety program. The operating system is NT 4.0.

<Problem>
I need to count the number of each type of EnrolStatus for this class.

<Tables Set-Up>
Table Name: Registration
Field Names: EnrolStatus
Field Names: Class_OID

The EnrolStatus is broken down into 4 groups
0=enrolled
1=finished
2=cancelled
3=No Show

The class OID is 1300

<Tried but didn't work>

SELECT * FROM REGISTRATION WHERE REGISTRATION.CLASS_OID = 1300 AND
Recordcount(*) REGISTRATION.EnrolSTATUS = 1

I am hoping someone can help me.

Forgive me if I didn't state everything with the right termsHi mlscw,

To count the number of each type of EnrolStatus of the class. You will need to use the GROUP BY clause and then take the COUNT.

select enrolstatus, count(*)
from registration
where class_oid = 1300
group by enrolstatus

HTH