Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating a Parameter
Message
From
29/06/1999 12:44:35
 
 
To
29/06/1999 10:53:26
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
00232597
Message ID:
00235324
Views:
29
Comments inline...


>Hi Michael
>
>Thanks for the reply. Basically, I am trying to build the same exact database that I built in FoxPro, but in SQL Server.
>
>I built quite a few parameterized views in FoxPro, and was trying to do the same in SQL. How do you accomplish that if you can't construct Pviews?

You VFP parameterized views will work as expected but you'll have to convert them to remove views.

>
>Are you familiar with the Visaul Interdev Database Tools? You can create Parameterized Queries with those tools. Have you seen that?

I've seen the tools but I've not used them.

>
>What I have done is created a connection to my SQL Server Database and called up the database in Visual Interdev. I have been using Visual Interdevs interface to build the tables, indexes, set relations, triggers, etc. etc.
>
>It has worked out real nice. The Visual Interdev Data Tools also comes with a query designer, which works real nice as well. I got confused trying to build views though, which is why I posted my question the other day. When I tried to write a SQL statement, just as I had done in FoxPro, to create a pview, it wouldn't accept it.
>
>However, if I went to my program manager (in Visual Interdev), to the "global" icon (node) and selected "create a data command", the query designer popped up and I could create a pview. The concern I had was that the "view" was stored in the program manager tree, under the global node as a SQL COMMAND. It wasn't stored in the data view (where all my table are) under the view node. That was a little confusing to me.
>

I wonder if you've created an ADO parameterized query. SQL Server does not support anything like VFP's parameterized views.

Another option would be for you to create a stored procedure which return a result set:

CREATE PROCEDURE [p_myprocedure]
@MaxID int
AS
SELECT * FROM customer WHERE CustID < @MaxID


You'll have to call it using VFP's SPT.

-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform