Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #7523 > unrolled thread
| Started by | dextrasistemas.jorge@gmail.com |
|---|---|
| First post | 2014-11-26 02:35 -0800 |
| Last post | 2014-12-01 12:04 +0000 |
| Articles | 13 — 4 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
About Ado create view dextrasistemas.jorge@gmail.com - 2014-11-26 02:35 -0800
Re: About Ado create view Malcolm G <malcolm-news2012delete@delete.jobstream.com> - 2014-11-26 13:54 +0000
Re: About Ado create view dextrasistemas.jorge@gmail.com - 2014-11-26 07:52 -0800
Re: About Ado create view "Wolfgang Riedmann" <wriedmann@gmail.com> - 2014-11-26 17:39 +0100
Re: About Ado create view Malcolm G <malcolm-news2012delete@delete.jobstream.com> - 2014-11-26 17:55 +0000
Re: About Ado create view Malcolm G <malcolm-news2012delete@delete.jobstream.com> - 2014-11-28 14:33 +0000
Re: About Ado create view dextrasistemas.jorge@gmail.com - 2014-11-28 11:06 -0800
Re: About Ado create view Malcolm G <malcolm-news2012delete@delete.jobstream.com> - 2014-11-28 20:51 +0000
Re: About Ado create view dextrasistemas.jorge@gmail.com - 2014-11-26 10:26 -0800
Re: About Ado create view dextrasistemas.jorge@gmail.com - 2014-11-29 03:04 -0800
Re: About Ado create view Robert van der Hulst <rjvanderhulst@gmail.com> - 2014-11-30 08:13 -0800
Re: About Ado create view dextrasistemas.jorge@gmail.com - 2014-12-01 03:37 -0800
Re: About Ado create view Malcolm G <malcolm-news2012delete@delete.jobstream.com> - 2014-12-01 12:04 +0000
| From | dextrasistemas.jorge@gmail.com |
|---|---|
| Date | 2014-11-26 02:35 -0800 |
| Subject | About Ado create view |
| Message-ID | <0b4e7344-c6e9-4786-98d0-7f99ce75aa5d@googlegroups.com> |
Hello
IF I create ( see bellow ) a View within my app ( vo 2.8 win7 64 sqlserver 2008r2 Vo2Ado )
The view not works.
IF I create it out of my app ( with some utility ) all works fine...
Why ?
oCmd := AdoCommand{}
oCmd:ActiveConnection := oLogin:oConn
cQuery := ' CREATE VIEW vw_ordenes_de_compra AS ' + ;
' SELECT o.Ord_ID, o.fecha, t.operacion , p.proveedor, f.FormaPago, o.total, o.aprobada, o.completa, o.enviada FROM ordenes AS o ' + ;
' JOIN proveedores as p ON p.Pro_ID = o.Pro_ID ' + ;
' JOIN operaciones as t ON t.Ope_ID = o.Ope_ID ' + ;
' JOIN formapago as f ON f.Pag_ID = o.Pag_ID '
oCmd:CommandText := cQuery
oCmd:CommandType := adCmdText
oCmd:Execute(@lResult,nil,nil)
Best regards
Jorge
[toc] | [next] | [standalone]
| From | Malcolm G <malcolm-news2012delete@delete.jobstream.com> |
|---|---|
| Date | 2014-11-26 13:54 +0000 |
| Message-ID | <8Ykdw.11590$Za1.10196@fx22.am4> |
| In reply to | #7523 |
On 26/11/2014 10:35, dextrasistemas.jorge@gmail.com wrote:
>
> Hello
>
> IF I create ( see bellow ) a View within my app ( vo 2.8 win7 64 sqlserver 2008r2 Vo2Ado )
> The view not works.
> IF I create it out of my app ( with some utility ) all works fine...
>
> Why ?
>
>
> oCmd := AdoCommand{}
> oCmd:ActiveConnection := oLogin:oConn
>
>
>
> cQuery := ' CREATE VIEW vw_ordenes_de_compra AS ' + ;
> ' SELECT o.Ord_ID, o.fecha, t.operacion , p.proveedor, f.FormaPago, o.total, o.aprobada, o.completa, o.enviada FROM ordenes AS o ' + ;
> ' JOIN proveedores as p ON p.Pro_ID = o.Pro_ID ' + ;
> ' JOIN operaciones as t ON t.Ope_ID = o.Ope_ID ' + ;
> ' JOIN formapago as f ON f.Pag_ID = o.Pag_ID '
>
>
> oCmd:CommandText := cQuery
> oCmd:CommandType := adCmdText
>
>
> oCmd:Execute(@lResult,nil,nil)
>
> Best regards
> Jorge
What error(s) do you get on create?
Is the view created and not usable or not created?
Does the user you are using have rights to create views (in the app and
in the external utility)?
[toc] | [prev] | [next] | [standalone]
| From | dextrasistemas.jorge@gmail.com |
|---|---|
| Date | 2014-11-26 07:52 -0800 |
| Message-ID | <74319246-e4b9-43d9-809c-bc8bd9a01b9a@googlegroups.com> |
| In reply to | #7525 |
El miércoles, 26 de noviembre de 2014 10:54:14 UTC-3, Malcolm G escribió:
> On 26/11/2014 10:35, dextrasistemas.jorge@gmail.com wrote:
> >
> > Hello
> >
> > IF I create ( see bellow ) a View within my app ( vo 2.8 win7 64 sqlserver 2008r2 Vo2Ado )
> > The view not works.
> > IF I create it out of my app ( with some utility ) all works fine...
> >
> > Why ?
> >
> >
> > oCmd := AdoCommand{}
> > oCmd:ActiveConnection := oLogin:oConn
> >
> >
> >
> > cQuery := ' CREATE VIEW vw_ordenes_de_compra AS ' + ;
> > ' SELECT o.Ord_ID, o.fecha, t.operacion , p.proveedor, f.FormaPago, o.total, o.aprobada, o.completa, o.enviada FROM ordenes AS o ' + ;
> > ' JOIN proveedores as p ON p.Pro_ID = o.Pro_ID ' + ;
> > ' JOIN operaciones as t ON t.Ope_ID = o.Ope_ID ' + ;
> > ' JOIN formapago as f ON f.Pag_ID = o.Pag_ID '
> >
> >
> > oCmd:CommandText := cQuery
> > oCmd:CommandType := adCmdText
> >
> >
> > oCmd:Execute(@lResult,nil,nil)
> >
> > Best regards
> > Jorge
>
> What error(s) do you get on create?
> Is the view created and not usable or not created?
> Does the user you are using have rights to create views (in the app and
> in the external utility)?
1) I have no error on create
( The view appears on sql management )
2) The view does not return data, only that ,
there is no message/error etc
( both in my app and sqlserver managemnt )
3) All happens on my stand alone pc ( same user
Jorge
[toc] | [prev] | [next] | [standalone]
| From | "Wolfgang Riedmann" <wriedmann@gmail.com> |
|---|---|
| Date | 2014-11-26 17:39 +0100 |
| Message-ID | <cdme26Fv5mU1@mid.individual.net> |
| In reply to | #7526 |
Hi Jorge, > > > IF I create ( see bellow ) a View within my app ( vo 2.8 win7 > > > 64 sqlserver 2008r2 Vo2Ado ) The view not works. > > > IF I create it out of my app ( with some utility ) all works > > > fine... > > > Why ? > 1) I have no error on create > ( The view appears on sql management ) > > 2) The view does not return data, only that , > there is no message/error etc > ( both in my app and sqlserver managemnt ) > > 3) All happens on my stand alone pc ( same user it could be possible that the view needs to be "compiled" and that your utility does this automatically. Wolfgang --
[toc] | [prev] | [next] | [standalone]
| From | Malcolm G <malcolm-news2012delete@delete.jobstream.com> |
|---|---|
| Date | 2014-11-26 17:55 +0000 |
| Message-ID | <_todw.12211$zz2.5728@fx06.am4> |
| In reply to | #7526 |
On 26/11/2014 15:52, dextrasistemas.jorge@gmail.com wrote:
> El miércoles, 26 de noviembre de 2014 10:54:14 UTC-3, Malcolm G escribió:
>> On 26/11/2014 10:35, dextrasistemas.jorge@gmail.com wrote:
>>>
>>> Hello
>>>
>>> IF I create ( see bellow ) a View within my app ( vo 2.8 win7 64 sqlserver 2008r2 Vo2Ado )
>>> The view not works.
>>> IF I create it out of my app ( with some utility ) all works fine...
>>>
>>> Why ?
>>>
>>>
>>> oCmd := AdoCommand{}
>>> oCmd:ActiveConnection := oLogin:oConn
>>>
>>>
>>>
>>> cQuery := ' CREATE VIEW vw_ordenes_de_compra AS ' + ;
>>> ' SELECT o.Ord_ID, o.fecha, t.operacion , p.proveedor, f.FormaPago, o.total, o.aprobada, o.completa, o.enviada FROM ordenes AS o ' + ;
>>> ' JOIN proveedores as p ON p.Pro_ID = o.Pro_ID ' + ;
>>> ' JOIN operaciones as t ON t.Ope_ID = o.Ope_ID ' + ;
>>> ' JOIN formapago as f ON f.Pag_ID = o.Pag_ID '
>>>
>>>
>>> oCmd:CommandText := cQuery
>>> oCmd:CommandType := adCmdText
>>>
>>>
>>> oCmd:Execute(@lResult,nil,nil)
>>>
>>> Best regards
>>> Jorge
>>
>> What error(s) do you get on create?
>> Is the view created and not usable or not created?
>> Does the user you are using have rights to create views (in the app and
>> in the external utility)?
>
>
>
> 1) I have no error on create
> ( The view appears on sql management )
Umm - so if the view is there and correctly defined what is the problem
(as if the view is in SQL server and does not work on SQL server the
problem is not in VO)
> 2) The view does not return data, only that ,
> there is no message/error etc
> ( both in my app and sqlserver managemnt )
Does every property of the view look the same in sql server for both
ways of making it?
What happens if you make the view in sql server management studio rather
than using the "tool"?
[toc] | [prev] | [next] | [standalone]
| From | Malcolm G <malcolm-news2012delete@delete.jobstream.com> |
|---|---|
| Date | 2014-11-28 14:33 +0000 |
| Message-ID | <hJ%dw.17868$Jf4.3678@fx41.am4> |
| In reply to | #7525 |
On 26/11/2014 13:54, Malcolm G wrote: > What error(s) do you get on create? > Is the view created and not usable or not created? > Does the user you are using have rights to create views (in the app and > in the external utility)? Just to say as far as i can see if you cut down the code we use to create views this is what you would get.
[toc] | [prev] | [next] | [standalone]
| From | dextrasistemas.jorge@gmail.com |
|---|---|
| Date | 2014-11-28 11:06 -0800 |
| Message-ID | <77c75449-a758-4021-b104-ee99be63d997@googlegroups.com> |
| In reply to | #7543 |
El viernes, 28 de noviembre de 2014 11:33:50 UTC-3, Malcolm G escribió:
> On 26/11/2014 13:54, Malcolm G wrote:
>
> > What error(s) do you get on create?
> > Is the view created and not usable or not created?
> > Does the user you are using have rights to create views (in the app and
> > in the external utility)?
>
> Just to say as far as i can see if you cut down the code we use to
> create views this is what you would get.
This is my code, very simple
oCmd := AdoCommand{}
oCmd:ActiveConnection := oLogin:oConn
cQuery := ' CREATE VIEW vw_ordenes_de_compra AS ' + ;
' SELECT o.Ord_ID, o.fecha, t.operacion , p.proveedor, f.FormaPago, o.total, o.aprobada, o.completa, o.enviada FROM ordenes AS o ' + ;
' JOIN proveedores as p ON p.Pro_ID = o.Pro_ID ' + ;
' JOIN operaciones as t ON t.Ope_ID = o.Ope_ID ' + ;
' JOIN formapago as f ON f.Pag_ID = o.Pag_ID '
oCmd:CommandText := cQuery
oCmd:CommandType := adCmdText
oCmd:Execute(@lResult,nil,nil)
[toc] | [prev] | [next] | [standalone]
| From | Malcolm G <malcolm-news2012delete@delete.jobstream.com> |
|---|---|
| Date | 2014-11-28 20:51 +0000 |
| Message-ID | <8f5ew.35429$066.31676@fx16.am4> |
| In reply to | #7545 |
On 28/11/2014 19:06, dextrasistemas.jorge@gmail.com wrote: > El viernes, 28 de noviembre de 2014 11:33:50 UTC-3, Malcolm G escribió: >> On 26/11/2014 13:54, Malcolm G wrote: >> >>> What error(s) do you get on create? >>> Is the view created and not usable or not created? >>> Does the user you are using have rights to create views (in the app and >>> in the external utility)? >> >> Just to say as far as i can see if you cut down the code we use to >> create views this is what you would get. > > > This is my code, very simple > [snip] I am afraid I don't think I can help you as you are not providing the information necessary to suggest what the problem might be. based on what you said >> 1) I have no error on create >> ( The view appears on sql management ) I think the problem that needs to be diagnosed is what is different I previously said: > Does every property of the view look the same in sql server for both > ways of making it? I have not seen that addressed, but I think it is the critical question - what is actually different (assuming the VO code does actually create the view) - if everything is 100% the same sql server should not be able to tell the difference, so your app should not be able to tell the difference.
[toc] | [prev] | [next] | [standalone]
| From | dextrasistemas.jorge@gmail.com |
|---|---|
| Date | 2014-11-26 10:26 -0800 |
| Message-ID | <775f431e-dc67-44d2-ae41-76dcd2647fff@googlegroups.com> |
| In reply to | #7523 |
El miércoles, 26 de noviembre de 2014 07:35:47 UTC-3, dextrasist...@gmail.com escribió:
> Hello
>
> IF I create ( see bellow ) a View within my app ( vo 2.8 win7 64 sqlserver 2008r2 Vo2Ado )
> The view not works.
> IF I create it out of my app ( with some utility ) all works fine...
>
> Why ?
>
>
> oCmd := AdoCommand{}
> oCmd:ActiveConnection := oLogin:oConn
>
>
>
> cQuery := ' CREATE VIEW vw_ordenes_de_compra AS ' + ;
> ' SELECT o.Ord_ID, o.fecha, t.operacion , p.proveedor, f.FormaPago, o.total, o.aprobada, o.completa, o.enviada FROM ordenes AS o ' + ;
> ' JOIN proveedores as p ON p.Pro_ID = o.Pro_ID ' + ;
> ' JOIN operaciones as t ON t.Ope_ID = o.Ope_ID ' + ;
> ' JOIN formapago as f ON f.Pag_ID = o.Pag_ID '
>
>
> oCmd:CommandText := cQuery
> oCmd:CommandType := adCmdText
>
>
> oCmd:Execute(@lResult,nil,nil)
>
> Best regards
> Jorge
"What happens if you make the view in sql server management studio rather
than using the "tool"?"
Works fine.( VO and management )
Actually in this way I'm working.
"it could be possible that the view needs to be "compiled" and that your
utility does this automatically."
May be this the answer ... But how i maus to do it VO ?
[toc] | [prev] | [next] | [standalone]
| From | dextrasistemas.jorge@gmail.com |
|---|---|
| Date | 2014-11-29 03:04 -0800 |
| Message-ID | <7891babb-eb48-4148-90f4-464d06300ba8@googlegroups.com> |
| In reply to | #7523 |
El miércoles, 26 de noviembre de 2014 07:35:47 UTC-3, dextrasist...@gmail.com escribió:
> Hello
>
> IF I create ( see bellow ) a View within my app ( vo 2.8 win7 64 sqlserver 2008r2 Vo2Ado )
> The view not works.
> IF I create it out of my app ( with some utility ) all works fine...
>
> Why ?
>
>
> oCmd := AdoCommand{}
> oCmd:ActiveConnection := oLogin:oConn
>
>
>
> cQuery := ' CREATE VIEW vw_ordenes_de_compra AS ' + ;
> ' SELECT o.Ord_ID, o.fecha, t.operacion , p.proveedor, f.FormaPago, o.total, o.aprobada, o.completa, o.enviada FROM ordenes AS o ' + ;
> ' JOIN proveedores as p ON p.Pro_ID = o.Pro_ID ' + ;
> ' JOIN operaciones as t ON t.Ope_ID = o.Ope_ID ' + ;
> ' JOIN formapago as f ON f.Pag_ID = o.Pag_ID '
>
>
> oCmd:CommandText := cQuery
> oCmd:CommandType := adCmdText
>
>
> oCmd:Execute(@lResult,nil,nil)
>
> Best regards
> Jorge
Thanks anyway, luckily the
problem is not dramatic ...
Jorge
[toc] | [prev] | [next] | [standalone]
| From | Robert van der Hulst <rjvanderhulst@gmail.com> |
|---|---|
| Date | 2014-11-30 08:13 -0800 |
| Message-ID | <c2af70ff-7a9a-4452-9b6f-38fb30516dc7@googlegroups.com> |
| In reply to | #7523 |
Jorge,
I think you are using a different user when creating the view from the VO code.
And since you are not using a schema prefix in the View name then you will most likely be creating a view in a different schema.
Try to change your code and add the "dbo." prefix to the view name.
I would not be surprised if that will make the difference.
Or change the user in the Database and give him dbo rights.
Robert van der Hulst
Vo2Ado Support
> Hello
>
> IF I create ( see bellow ) a View within my app ( vo 2.8 win7 64 sqlserver 2008r2 Vo2Ado )
> The view not works.
> IF I create it out of my app ( with some utility ) all works fine...
>
> Why ?
>
>
> oCmd := AdoCommand{}
> oCmd:ActiveConnection := oLogin:oConn
>
>
>
> cQuery := ' CREATE VIEW vw_ordenes_de_compra AS ' + ;
> ' SELECT o.Ord_ID, o.fecha, t.operacion , p.proveedor, f.FormaPago, o.total, o.aprobada, o.completa, o.enviada FROM ordenes AS o ' + ;
> ' JOIN proveedores as p ON p.Pro_ID = o.Pro_ID ' + ;
> ' JOIN operaciones as t ON t.Ope_ID = o.Ope_ID ' + ;
> ' JOIN formapago as f ON f.Pag_ID = o.Pag_ID '
>
>
> oCmd:CommandText := cQuery
> oCmd:CommandType := adCmdText
>
>
> oCmd:Execute(@lResult,nil,nil)
>
> Best regards
> Jorge
[toc] | [prev] | [next] | [standalone]
| From | dextrasistemas.jorge@gmail.com |
|---|---|
| Date | 2014-12-01 03:37 -0800 |
| Message-ID | <49cd958b-3da0-49d8-8679-ac5e22681e95@googlegroups.com> |
| In reply to | #7553 |
El domingo, 30 de noviembre de 2014 13:13:36 UTC-3, Robert van der Hulst escribió:
> Jorge,
>
> I think you are using a different user when creating the view from the VO code.
> And since you are not using a schema prefix in the View name then you will most likely be creating a view in a different schema.
>
> Try to change your code and add the "dbo." prefix to the view name.
> I would not be surprised if that will make the difference.
>
> Or change the user in the Database and give him dbo rights.
>
> Robert van der Hulst
> Vo2Ado Support
>
>
> > Hello
> >
> > IF I create ( see bellow ) a View within my app ( vo 2.8 win7 64 sqlserver 2008r2 Vo2Ado )
> > The view not works.
> > IF I create it out of my app ( with some utility ) all works fine...
> >
> > Why ?
> >
> >
> > oCmd := AdoCommand{}
> > oCmd:ActiveConnection := oLogin:oConn
> >
> >
> >
> > cQuery := ' CREATE VIEW vw_ordenes_de_compra AS ' + ;
> > ' SELECT o.Ord_ID, o.fecha, t.operacion , p.proveedor, f.FormaPago, o.total, o.aprobada, o.completa, o.enviada FROM ordenes AS o ' + ;
> > ' JOIN proveedores as p ON p.Pro_ID = o.Pro_ID ' + ;
> > ' JOIN operaciones as t ON t.Ope_ID = o.Ope_ID ' + ;
> > ' JOIN formapago as f ON f.Pag_ID = o.Pag_ID '
> >
> >
> > oCmd:CommandText := cQuery
> > oCmd:CommandType := adCmdText
> >
> >
> > oCmd:Execute(@lResult,nil,nil)
> >
> > Best regards
> > Jorge
Thanks Robert , you were right !
Jorge
[toc] | [prev] | [next] | [standalone]
| From | Malcolm G <malcolm-news2012delete@delete.jobstream.com> |
|---|---|
| Date | 2014-12-01 12:04 +0000 |
| Message-ID | <sPYew.53822$Jf4.45326@fx41.am4> |
| In reply to | #7558 |
On 01/12/2014 11:37, dextrasistemas.jorge@gmail.com wrote:
> El domingo, 30 de noviembre de 2014 13:13:36 UTC-3, Robert van der Hulst escribió:
>> Jorge,
>>
>> I think you are using a different user when creating the view from the VO code.
>> And since you are not using a schema prefix in the View name then you will most likely be creating a view in a different schema.
>>
>> Try to change your code and add the "dbo." prefix to the view name.
>> I would not be surprised if that will make the difference.
>>
>> Or change the user in the Database and give him dbo rights.
>>
>> Robert van der Hulst
>> Vo2Ado Support
>>
>>
>>> Hello
>>>
>>> IF I create ( see bellow ) a View within my app ( vo 2.8 win7 64 sqlserver 2008r2 Vo2Ado )
>>> The view not works.
>>> IF I create it out of my app ( with some utility ) all works fine...
>>>
>>> Why ?
>>>
>>>
>>> oCmd := AdoCommand{}
>>> oCmd:ActiveConnection := oLogin:oConn
>>>
>>>
>>>
>>> cQuery := ' CREATE VIEW vw_ordenes_de_compra AS ' + ;
>>> ' SELECT o.Ord_ID, o.fecha, t.operacion , p.proveedor, f.FormaPago, o.total, o.aprobada, o.completa, o.enviada FROM ordenes AS o ' + ;
>>> ' JOIN proveedores as p ON p.Pro_ID = o.Pro_ID ' + ;
>>> ' JOIN operaciones as t ON t.Ope_ID = o.Ope_ID ' + ;
>>> ' JOIN formapago as f ON f.Pag_ID = o.Pag_ID '
>>>
>>>
>>> oCmd:CommandText := cQuery
>>> oCmd:CommandType := adCmdText
>>>
>>>
>>> oCmd:Execute(@lResult,nil,nil)
>>>
>>> Best regards
>>> Jorge
>
> Thanks Robert , you were right !
>
> Jorge
>
>
Great
I hadn't thought of that cause (also I was thrown by the assertion that
the view was created and assumed you knew dbo.wombat and mark.wombat are
different views, once you have made that mistake once you tend not to
make it again)
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web