Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Database and Reporting > Missing Operand


Reply
 
Thread Tools Display Modes
  #1  
Old 11-07-2003, 08:48 AM
Phluxed Phluxed is offline
Centurion
 
Join Date: Sep 2003
Posts: 124
Default Missing Operand


I have the following code

Code:
OpenFox With FoxR .ActiveConnection = FoxC .Source = "Select * From TABLES Where NUMBER = " & tablenum .CursorType = adOpenStatic .LockType = adLockOptimistic .CursorLocation = adUseClient .Open If Not .BOF And Not .EOF Then .Fields("TIMETYPE").Value = timetype .Fields("NAME").Value = name1 .Fields("RUNTIME").Value = time1 & ":" & time2 .Update End If .Close End With

and on the line .Open I get the error Missing Operand.
__________________
In THEORY communism works... In THEORY Mountain Dew tastes good...
Reply With Quote
  #2  
Old 11-07-2003, 09:42 AM
wildbeliefs wildbeliefs is offline
Freshman
 
Join Date: Oct 2003
Posts: 42
Default

I'm assuming that FoxC is properly defined, right?
Reply With Quote
  #3  
Old 11-07-2003, 09:44 AM
Phluxed Phluxed is offline
Centurion
 
Join Date: Sep 2003
Posts: 124
Default

Quote:
Originally Posted by wildbeliefs
I'm assuming that FoxC is properly defined, right?


I believe so. I mean, the exact code works in another place.
__________________
In THEORY communism works... In THEORY Mountain Dew tastes good...
Reply With Quote
  #4  
Old 11-07-2003, 10:03 AM
wildbeliefs wildbeliefs is offline
Freshman
 
Join Date: Oct 2003
Posts: 42
Default

[QUOTEPOST='Phluxed']
Code:
OpenFox .Source = "Select * From TABLES Where NUMBER = " & tablenum

you're missing the & ";" at the end of your sql statement. I don't remember if you also need single quotations around tablenum or not...
Reply With Quote
  #5  
Old 11-07-2003, 10:09 AM
Phluxed Phluxed is offline
Centurion
 
Join Date: Sep 2003
Posts: 124
Default

Merci Buckets. Thanks for the extra pair of eyes. Figured it out.
__________________
In THEORY communism works... In THEORY Mountain Dew tastes good...
Reply With Quote
  #6  
Old 11-07-2003, 10:14 AM
reboot's Avatar
reboot reboot is offline
Keeper of foo

Retired Moderator
* Guru *
 
Join Date: Nov 2001
Location: Graceland
Posts: 15,612
Default

";" at the end of an sql statement is unnecesary. That couldn't have been the problem.
__________________
~ Quod non mortiferum, fortiorem me facit ~

Avatar by lebb
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
compare excel sheets / find missing records screw Excel 2 07-31-2003 06:05 AM
Missing Reference in VB Niren General 3 06-27-2003 04:11 AM
Problem with Direct Input and Direct Sound Waxycat Miscellaneous Languages 15 06-06-2003 11:03 AM
Yoderic's Battle Arena -- Come And Play!! JDYoder Game Programming 4 12-11-2001 09:59 AM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->