Wrox Programmer Forums
Visual Studio 2005 For discussing Visual Studio 2005. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Studio 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old June 15th, 2007, 09:55 AM
Registered User
Join Date: Jun 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default MS ACCESS + Microsoft Visual Studio

I am trying to use a MS Access Database in an vb.aspx page.

I have written the following two queries.. but they are giving me errors which i am unable to fix.ANy help in this regard would be highly appreciated .

Query 1: Dim sSQL As String = "UPDATE AuthorTable" & _
                             " SET ID ='" & sID & "',Name = '" & sName & "',BookID ='" & sID & "',Date ='" & sDate & ""

It gives me the error: Syntax error in string in query expression '''.
I understand that there is probably a problem with the way I am ending the query. But I do not understand what would be the correct syntax. Please Help.

Query 2:
Dim sSQL As String = "SELECT COUNT(*)" & _
                              "FROM (" & _
                                "SELECT DISTINCT LastName" & _
                                 " FROM Authors" & _
                              "WHERE Month = '" & sMonth & "' AND ID = '" & sID & "')"

Error: Operator '&' is not defined for string "SELECT COUNT(*)FROM (SELECT DIST" and type 'ListItem'.

Would really appreciate a quick response.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access mdb, ASPX and Visual Studio philb VB Databases Basics 5 February 21st, 2008 12:34 PM
Microsoft Web Browser used in MS Access Form jeff1804 Access 8 December 9th, 2005 07:17 PM
visual studio for ms office dartcoach Access 2 June 17th, 2005 02:38 PM
Qbase engine for VB or MS Visual Studio uchenik Pro VB Databases 0 February 8th, 2004 12:45 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.