Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 1st, 2003, 07:30 AM
jharber15 jharber15 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 41 jharber15 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
SQL/VB Problem

I am having a bit of an sql problem with the application that I am making. Here is my sql section

If sqltxt.Text <> "" Then
mysql = sqltxt.Text & ""
Else
mysql = "select * FROM Transactions WHERE ((([Transactions].[Include])=Yes)) "
End If



Now, sqltxt is a text box that a user can insert sql or choose automated sql statements to appear in. The "else" sql statement works, but when I do any sql that calls a specific field in the table, it says that it doesn't exist. For example, the first field in my table is [Transactions].[TID], or just TID, but it will say "Item not found in collection."


Any ideas what i'm doing wrong? This situation is hard to describe, but i figured i'd give it a shot.

Reply With Quote
  #2  
Old August 1st, 2003, 09:34 AM
nopoints nopoints is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Windsor ON, Canada
Posts: 459 nopoints User rank is Corporal (100 - 500 Reputation Level)nopoints User rank is Corporal (100 - 500 Reputation Level)nopoints User rank is Corporal (100 - 500 Reputation Level)nopoints User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 13 h 44 m 22 sec
Reputation Power: 8
what line does the error occur on?
__________________
Programmer's Corner

Reply With Quote
  #3  
Old August 1st, 2003, 10:35 AM
jharber15 jharber15 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 41 jharber15 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
on the sql export it tells me that the item doesn't exist in the table. It does that even if I use the include that does work in the else statement

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > SQL/VB Problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway