The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
NEED HELP PLZ. Views and Version 7.
Posted: 17 Mar 07 3:18 PM
|
fiogf49gjkf0d I am running into a problem with accessing sql views using SLXOLE provider for version 7. I get this error: SalesLogix OLE DB Provider error '8004277b'
Invalid table name.
It is a view that begins with SLX_ so I wasnt sure if i am running into a reserved word problem or what.
I have tried googling my hands off with no real results, but I keep getting sent here so I figure you guys know whats up. Any help you can offer would be greatly appreciated. We are in major panic mode down here so time is of the essence. Please help a poor jr developer out. |
|
|
|
Re: NEED HELP PLZ. Views and Version 7.
Posted: 18 Mar 07 7:34 AM
|
fiogf49gjkf0d A - First of all there is no 7.1 - it's 7.0 w/SP1 which makes it 7.0.1. There is not going to be a 7.1 B - How did you cerate the SQL view? C - sysdba MUST own the SQL view or it will NOT work.. ever.. D - What is the exact SQL that you use to create the view. The provider does NOT pass all SQL. It' sintentionally designed that way. E - SQL views are "enabled" via the SalesLogix DB manager... it's ALL in the documentation for 7.0
-- rjl |
|
|
|
Re: NEED HELP PLZ. Views and Version 7.
Posted: 19 Mar 07 1:58 PM
|
fiogf49gjkf0d I appreciate the help, although i dont believe i mentioned version 7.1. Also would you happen to know WHICH piece of documentation its in should i run into similar problems in the future.
The view was created previously we are doing an upgrade from 5.x to 7.0.1 so we are trying to deal with multiple upgrade pieces and getting similar functionality as we previously had. It has been a bit of a challenge. |
|
|
|
Re: NEED HELP PLZ. Views and Version 7.
Posted: 19 Mar 07 3:49 PM
|
fiogf49gjkf0d Basically it comes down to this:
1) The view needs to be owned by sysdba 2) Once owned by sysdba you will see it listed in the DB Manager in Architect or Administrator (it will be listed with the other tables on the left side). You can right click it and select Properties. Then click the "Enable" button. This will make the view "visible" to SLX.
Make sense?
BTW, I'm not sure where it would be in the docs, I never look there as I have little confidence in the slx documentation (there's just so little of it )
-Ryan |
|
|
|
Re: NEED HELP PLZ. Views and Version 7.
Posted: 19 Mar 07 3:53 PM
|
fiogf49gjkf0d But all that said, it comes down to how you're using it. I'm pretty sure you can still reference a view in code & data access even without enabling it. Even if it isn't owned by sysdba you just have to prefix the view with the table name.
How are you using the view? In code or trying to bind a grid to it or something? (for that you'd need to enable it for sure) |
|
|
|
Re: NEED HELP PLZ. Views and Version 7.
Posted: 19 Mar 07 4:05 PM
|
fiogf49gjkf0d For example, I can create the following view:
create view sysdba.vAccountList as select accountid , account , type
from sysdba.account
And then use this code (without first enabling the view in the DB Manager)
Dim rs Set rs = Application.GetNewConnection.Execute("select * from vaccountlist") While Not rs.EOF ListBox1.Items.Add rs.Fields("account").Value & "" rs.MoveNext Wend rs.Close Set rs = Nothing
And all works OK. However, if I needed to bind the view to a grid, or have it be visible in the query builder for users or something, then I would need to enable it.
Even if my view isn't owned by sysdba, that is OK if I just need to use it in data access code. I just need to make sure I prefix the tablename with the owner.
ie:
create view dbo.vAccountList2 as --etc...
and in my script:
Set rs = Application.GetNewConnection.Execute("select * from dbo.vAccountList2") 'etc...
Know what I mean? |
|
|
|
Re: NEED HELP PLZ. Views and Version 7.
Posted: 19 Mar 07 4:07 PM
|
fiogf49gjkf0d Originally posted by Ryan Farley
Even if my view isn't owned by sysdba, that is OK if I just need to use it in data access code. |
|
Just to clarify, if it isn't owned by sysdba I just won't be able to "enable" it in the DB Manager. It does have to be owned by sysdba for that. But that doesn't matter if you're just accessing it in code. |
|
|
|
Re: NEED HELP PLZ. Views and Version 7.
Posted: 19 Mar 07 4:16 PM
|
fiogf49gjkf0d Ryan, That was alot of very helpful information thank you so much, I will be sure to remind my boss how great you guys are. I have noticed that the documentation is a bit overwhelming especially the 700 page pdfs. We will try this and hopefully we will be able to be up and running. Thanks again Ryan.
|
|
|
|