Re: Serious errors with 'Create view' command



Thanks for trying anders but I am using VFP7 which has a version of ViewSql
that is read only!

I can't use the technique of writing 16 possible views as I can't seem to
find a way of persuading them to 'fill' the 'grid' that I am using in a form
to display the selected SKUs!

I was persuaded by people on this Forum to USE this technique of a View
'driving' a grid against my better judgement! If there is a way of Creating a
form with a 'grid that can be 'fed' by multiple 'views' I am damned if I can
see how to do it!

What on EARTH does the option of 'Edit Stored procedures' do? It sesm that I
should be able to paste my WORKING code into that 'section' and it should
regenerate the view each time I open the database. If it IS supposed to do
that, why DOESN'T it?

The more I use Visual Fox, the less I am impressed with it as a product!
Microsoft have taken a RELIABLE and WORKABLE version of Fox and made it
increasingly unstable, non-intuitive and unusable in my opinion!

"AA" wrote:

In VFP9 the view sql window is readwrite. And in VFP9 the brackets VFP
inserts are different from what you showed.

A possible solution is to let the user create ad hoc views in a temporary
database. That way you aren't forced into creating a single view that can
handle any possible combination of 1, 2 ,3 or 4 columns. If you want
classes=25 create the view
Create view Combinedview AS SELECT * FROM Inventory WHERE classes=25.
It' also possible to create 16 views to cover all contingences and then
always open one with USE viewX ALIAS Combinedview
-Anders

"Barley Man" <BarleyMan@xxxxxxxxxxxxxxxxxxxxxxxxx> skrev i meddelandet
news:B18419CD-0642-487F-BAA5-7814AB25481E@xxxxxxxxxxxxxxxx
Hi Tom

I can't get the view designer to create the coding that I need, either! It
doesn't come out with the same brackets. How are you suggesting that I cut
and paste it? It's the 'text' in the view designer 'sql view' that's WRONG
in
the first place and thus cutting and pasting that would just repeat the
problem. To where are you suggesting tyhat I 'paste' the cut-out anyway? I
can't paste it INTO the view designer sql view window as that's Read Only!

There is the facility to 'edit stored procedures' but I can't seem to make
that do ANYTHING!

ian



"tom knauf" wrote:

Hi,

I would create the view in the viewdesigner and cut/paste the code
generated
by the viewdesigner (right click - view sql)

HTH
Tom


"Barley Man" <BarleyMan@xxxxxxxxxxxxxxxxxxxxxxxxx> schrieb im Newsbeitrag
news:A4DB29BB-1787-4E90-83A6-2209790A74EA@xxxxxxxxxxxxxxxx
I have used the following 'create view' statment:-

Create Sql View combinedview;
AS Select inventory.inumbr, inventory.divno, inventory.deptno,
inventory.subdeptno, inventory.classno, ;
inventory.istyl;
FROM inventory ;
WHERE (?mydivno <= 0 Or divno = ?mydivno);
AND (?mydeptno <= 0 Or deptno = ?mydeptno);
AND (?mysubdeptno <= 0 Or subdeptno = ?mysubdeptno);
AND (?myclassno <= 0 Or classno = ?myclassno)

However, when I 'inspect' (modify) the created View by looking at the
sql,
the 'view' created is NOT the same as the one I requtested and appears
as
follows:-

SELECT Inventory.inumbr, Inventory.divno, Inventory.deptno,;
Inventory.subdeptno, Inventory.classno, Inventory.istyl;
FROM drilldown2!inventory;
WHERE ?mydivno <= 0;
OR (Inventory.divno = ?mydivno;
AND ?mydeptno <= 0);
OR (Inventory.deptno = ?mydeptno;
AND ?mysubdeptno <= 0);
OR (Inventory.subdeptno = ?mysubdeptno;
AND ?myclassno <= 0);
OR (Inventory.classno = ?myclassno)

The change is not immediately obvious to see but it IS there. The
positioning (and thus the effects) of the brackets have changed
SUBSTANTIALLY
and the routine simply fails to perform properly. I need the EXACT
functionality of the statement contained within the 'create
view'instructions
but I simply can't get it to 'transfer' into the database as a 'view'!

It does not appear to be a simple error in the 'view sql' routine as
the
view BEHAVES EXACTLY in line with the version being displayed by 'view
sql'
and that's NOT what I want, nor what I requested!

What on EARTH am I supposed to do about THAT?

Ian






.



Relevant Pages

  • Re: ADO stored proc
    ... could you recommend a book - vbscript or sql server? ... I don't like this technique since: ...
    (microsoft.public.scripting.vbscript)
  • Re: [Full-disclosure] noise about full-width encoding bypass?
    ... We have tested this technique for both XSS and SQL Injection with IIS ... character to the actual character (so %uFF07 is actually translated by ... this technique could be useful for a homograph attack. ...
    (Full-Disclosure)
  • Re: Output from SP (sql)
    ... > There is no reason to use an explicit command object to run this sql ... You should always tell ADO what the command type ... > I prefer this technique over the dynamic sql technique you've chosen since ... There's nothing wrong with using output parameters. ...
    (microsoft.public.inetserver.asp.db)
  • Re: Parameterizing sorting
    ... this is the dangerous technique I was avoiding. ... open your application up to SQL injection attacks using this technique. ... William (Bill) Vaughn ... > "William Vaughn" wrote: ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Executing SQL Store Procedure from VB Scripts
    ... > How I run a MS SQL stored procedure with in a VB script? ... I don't like this technique since: ... You have to worry about preventing hackers from injecting SQL into ... You also have to correctly handle string values ...
    (microsoft.public.scripting.vbscript)

Loading