|
-
May 19th, 2005, 06:36 AM
#1
Thread Starter
Lively Member
Sql statement to ADO code
Hi all,
I have created a DataEnvironment but when I copy the Sql statement in to an ADO code it wont work. The DataEnvironment works because I can drag it on to a form and it shows data. this is the sql statement:
SELECT [Screen Instruction Master 1].ORDER_NO, [Screen Instruction Master 1].DESIGN_REF, [Work In Progress].Stretch, [Work In Progress].[Glue 1], [Work In Progress].[Cut Out], [Work In Progress].[Glue Edges], [Work In Progress].Degrease, [Work In Progress].Dry1, [Work In Progress].[Coat 1], [Work In Progress].[Coat 2], [Work In Progress].[Frames Recieved], [Work In Progress].Engrave, [Work In Progress].Wash, [Work In Progress].Dry2, [Work In Progress].Harden, [Work In Progress].Pinhole, [Work In Progress].Paint, [Work In Progress].Silicone, [Work In Progress].Tape, [Work In Progress].Notes1, [Work In Progress].Notes2, [Work In Progress].Notes3, [Work In Progress].Notes4, [Work In Progress].Notes5, [Mesh tp].[Mesh tp], [Work In Progress].[Screen Making notes 1], [Mesh tp].[Mesh tp], [Work In Progress].[Mesh tp info], [Work In Progress].[Qty Frames Completed], [Work In Progress].[Qty Frames Req], [Work In Progress].[Frames Req Size Box Section], [Work In Progress].[Screenset req Priority], [Work In Progress].[Frame Notes from gaz], [Work In Progress].[Frames Completed], [Screen Instruction Master 1].FRAME_ID, [Screen Instruction Master 1].[Design Descript], [Work In Progress].[Screen Making notes 2], [Work In Progress].[Design Ref], [Work In Progress].[Job Id]
FROM [Screen Instruction Master 1] LEFT JOIN ([Work In Progress] LEFT JOIN [Mesh tp] ON [Work In Progress].[Mesh tp] = [Mesh tp].[Mesh tp id]) ON [Screen Instruction Master 1].DESIGN_REF = [Work In Progress].[Design Ref];
Basically I am pasting the above statement in to ADO code like - adoPrimaryRS.open "Sql statement here",db, adoOpentastic, adLockOpentastic
Is there any rules that change when you Paste an Sql statement in to ADO code?
Thanks
-
May 19th, 2005, 06:59 AM
#2
Re: Sql statement to ADO code
It might not be fitting in one line. Try to store it in a variable and then debug.print that variable to check whether the whole sql statement is there. Then open then ADO recordset.
-
May 19th, 2005, 07:17 AM
#3
Thread Starter
Lively Member
Re: Sql statement to ADO code
Sorry..... I did alter the statement to fit on multiple line by using the underscore_.
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
|