Wrox Programmer Forums
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 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 21st, 2003, 02:50 PM
Authorized User
 
Join Date: Jun 2003
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default sql statement

can anyone tell me why this wont work please

DatPrice.RecordSource = "update mvpr set a2 = scost where subkey1 = Spart"
DatPrice.Refresh
 
Old June 23rd, 2003, 03:28 PM
Registered User
 
Join Date: Jun 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by chrisangus@btinternet.com
 can anyone tell me why this wont work please

DatPrice.RecordSource = "update mvpr set a2 = scost where subkey1 = Spart"
DatPrice.Refresh
What error message are you getting?
 
Old June 23rd, 2003, 04:28 PM
Authorized User
 
Join Date: Jun 2003
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Without your being a bit more specific with what the fields are above I would guess this

Update mvpr
Set a2 = '" & scost & "'
Where subkey1 = '" & Spart & "';

This is assuming that 'scost' and 'Spart' are strings. In the future please tell us the data types that you are dealing with and I assure you that you will get me specific answers.

Kenny Alligood





Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with SQL Statement forumsUID SQL Server 2000 1 August 23rd, 2007 08:08 AM
convert a SQL Statement from MS Access to a SQL Corey Access 6 March 28th, 2007 12:33 PM
SQL Statement??? carswelljr SQL Server 2000 2 August 25th, 2006 12:40 PM
SQL Statement rylemer SQL Language 3 October 21st, 2005 09:07 PM
Sql Statement help morpheus Classic ASP Basics 0 March 9th, 2004 10:55 AM





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