|
-
Nov 22nd, 2004, 04:28 AM
#1
Thread Starter
Fanatic Member
Ms Flex grid query not working
I am sure i posted this before, but i cannot see it, so i guess not.
Every time i try to create a query and show it on the ms flex grid i getting an error saying, ms flex grid does not support this type of bound operation.
I am using a simple sql query-Now, i am not very good at sql in vb, its wierd compared to on Oracle.
VB Code:
strsql = "Select * from Invoice where Name = john smith;"
i initially put speach marks around john smith but it would'nt let me do that.
Any body know where i am going wrong?
-
Nov 22nd, 2004, 04:35 AM
#2
Fanatic Member
try this
VB Code:
strsql = "Select * from Invoice where [Name] = 'john smith';"
u need to use single quote to search for string criteria and put [] bracket for preserve words..
i think name isn't preserve words..but give it a try 
EDIT : RESERVED word not PRESERVED word. sorry
Last edited by erickwidya; Nov 23rd, 2004 at 11:38 PM.
-
Nov 22nd, 2004, 04:47 AM
#3
Thread Starter
Fanatic Member
Cheers, i was thinking of trying the ' ' section. I can't try it till i get home, but thanks for confiriming it.
A question though, what do you mean by preserve?
-
Nov 22nd, 2004, 04:51 AM
#4
Fanatic Member
i described preserve word as word that already been 'declared' in it (VB, Access, etc)
but maybe i'm wrong..:P
-
Nov 22nd, 2004, 05:12 AM
#5
Thread Starter
Fanatic Member
Oh right, looks like a trial and error situation. If i get an error will try it with [ ], if that don't work i'll asume it's something else.
-
Nov 23rd, 2004, 09:12 PM
#6
Fanatic Member
in other words something like that
-
Nov 23rd, 2004, 11:33 PM
#7
I think that he means RESERVED word. A word that can't be used, like SELECT, or FROM.
-
Nov 23rd, 2004, 11:38 PM
#8
Originally posted by snipered
Oh right, looks like a trial and error situation. If i get an error will try it with [ ], if that don't work i'll asume it's something else.
Also, the brackets are to be used when you have a table name or field name in your query that has a space in it.
Ex.
Code:
SELECT [First Name] FROM [Employee Names];
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|