Showing posts with label implementation. Show all posts
Showing posts with label implementation. Show all posts

Friday, March 30, 2012

runtime dlls issue of PowerBuilder

Hello All,
I have a PowerBuilder application in implementation phase rightnow. I have come to know that without registering craxdrt.dll, crviewer.dll, crdesignerctrl.dll , crqe.dll and crdo32.dll I am unable to preview report. I am not comfortable registering dlls in each desktop so would like to know how does this work in PowerBuilder. I am desparately looking for an answer. If somebody could help I will appreciate that.

Thanks
DilemmaHi, Dilemma. Did you have any solutions for your mentioned problems? It is because i am also facing same problems with you now.

If somebody could help, I will also appreciate that.

Thanks a lots!

Lily|||I am sorry lilly. If you are still struggling to get an answer then feel free to ask me.

Dilemma
http://www.dilemmaguru.com|||Hello All,
I have a PowerBuilder application in implementation phase rightnow. I have come to know that without registering craxdrt.dll, crviewer.dll, crdesignerctrl.dll , crqe.dll and crdo32.dll I am unable to preview report. I am not comfortable registering dlls in each desktop so would like to know how does this work in PowerBuilder. I am desparately looking for an answer. If somebody could help I will appreciate that.

Thanks
Dilemma

I have the same problem, can someone help me
Mike
evolna@.yahoo.com|||Hi there,
Actually i havn't got ur prob clearly.Anyway i would like to put forward whatever i know about how powerbuilder(PB) deals with DLLs.
Whenever PB come across a reference to any Dll function, it will search in 4 locations.
1.The current directory
2.The Windows directory
3.The Windows System subdirectory
4.Directories on the DOS path

hi Dilemma,
i didnt understand why u mentioned the Dlls craxdrt.dll, crviewer.dll, crdesignerctrl.dll , crqe.dll and crdo32.dll . I believe those are crystal reports Dlls. Are u using Crystal reports along with powerbuilder?

arfath@.gmail.com|||Hi I am runnignpowerbuilder 10 and want to run crystal reports from PB. I have the following code :

// create OLE object
g_ole_crx_application = CREATE OLEObject

// connect to craxdrt.Application
gi_return = g_ole_crx_application.ConnectToNewObject('CrystalRuntime.Application.11')
if gi_return < 0 then
MessageBox("Error", "Did not connect to Crystal Application Object")
return
else
MessageBox("O.K", "Connection to Crystal Application Object succeeded")
end if

gs_rpt_filename = "E:\Sybase\Crystal\Inventory Listing.rpt"

// Open the report object
g_ole_crx_report = g_ole_crx_application.OpenReport(gs_rpt_filename)

// Logon to the database
//
// Set connection_info to Report ConnectionProperties

g_ole_crx_connection_info = g_ole_crx_report.database.tables [2].ConnectionProperties

// Delete old connections
// Works with updating older reports
g_ole_crx_connection_info.deleteAll

// Add new connection
g_ole_crx_connection_info.add("DSN", "INFODEV")
g_ole_crx_connection_info.add("Database", "LinkSOLUTION")

When I run the report I get a message "Login Failed" from Crystal. Would anyy body know what could possibly be wrong.

Tuesday, February 21, 2012

running sp_updatestats is producing problems.

Hi to all,

1.I have first a question about one SP sp_updatestats.

Because the SP it is asking in the implementation about the sysadmin rights i got problems at running time.

Our user it is the db-owner but it is no sysadmin.

To give an example the sp : sp_createstats it is not asking for this rights, and this function it creates new objects in the db.

My first question is Why the sp_updatestats must ask for this rights what is the oficcial ansqear from Microsoft about this ?

I make a note this problem persist in the SQL Server 2005.

2.Now because of this problem i have tried to copy the sp from SQL Server 2000 and 2005 and to modify the SP to ask only for the owner rights.

So instead of

if not is_srvrolemember('sysadmin') = 1

I ask only for: if not IS_MEMBER ('db_owner') = 1.

In sql Server 2000 everything works fine in the SQL Server 2005 I got a very strange error:

'stats_ver_current' ist not identified as a known Function(translated error!).

Very strange I try to create this SP-copy using the sa account.

I have search for the function 'stats_ver_current' in SQL server books online and I found no documentation about. Google was no help too.

I was looking in the sysobjects too, no success.

What I am doing hier wrong ?

What should be a good solution for my rights problem with sp_updatestats ?

I'd first like to gain an understanding as to why you are trying to update statistics in the way that you are doing. Have you proven that out-of-date statistics are causing a performance problem after performing a particular action, or are you updating the statistics just to be sure?

If you absolutely must update statistics in this way then in SQL Server 2005 you can use EXECUTE AS to change execution context to another login or database user - this feature could help you out.

There's more detail here:

http://www.databasejournal.com/features/mssql/article.php/3596701

Chris

|||

The reason because I need to run the SP it is because I saw that some statisctics after some operations are out of date.

Of course this problem occurres not always it can depends of a lot of factors.

The idea is I need to update them. So in the SQL Server 2005 I wanted to use the new SP because as Microsoft says in the documentation it is something new to the SQL Server 2005. In the new implementation are not any more all the statistics reupdated just only that ones that are not any more up to date. So of course this will help the performance and the SP will run faster doing just what it is necesary.

About your idea of using exec as I cannot use it.

I dont have any account that have the sysadmin rights.The client does not allow us to have such an account.

Lets say on the Server are more databases. On our database we are owners so we should be able to do all the staff we need.As a sysadmin we will have the full control of all the databases and this it is a problem for our clients of course.

As I sayd I can run the SP sp_createstats 'indexonly' ' without problems. But he SP sp_updatestats I cannot run it.

Any other ideas to my questions ?

|||

Check out the following link:

http://msdn2.microsoft.com/en-us/library/ms187348.aspx

The UPDATE STATISTICS command will allow you to update statistics for a single table and requires only ALTER permissions on that table - this is actually the command that sp_updatestats uses.

You could create your own version of the existing sp_updatestats stored proc, that exists in the master database in SQL Server 2005, and make use of the 'STATS_DATE' function rather than the stats_ver_current function. This isn't ideal but it is better than doing nothing and should help get around your problem. If you decide to go down this route and don't use a user with database owner permissions to execute the stored proc then you will need to add ALTER permissions onto each of the tables you wish to update.

Hope this helps,

Chris

|||

Thanks for your answear.

I know the function 'STATS_DATE' that I can use instead of stats_ver_current. It had this idea too.It doenst have the same performance as the function stats_ver_current, but I can use it.

Or I can say I will use the SQL Server 2000 Stored Procedure, who knows what other bugs are in the date statistics info.

So updating allways the statistics maybe it is not as bad as we can think.

I still wait an official answear from a Microsoft Employee(or who it is answearing for this forum) to my 2 questions:

Why the stored procedure sp_updatestats(SQL2k and SQL2k5) it is asking for the sysadmin rights, and why the stored procedure sp_createstats not ?

And why I cannot use the function stats_ver_current in SQL Server 2k5 ?

|||

There seems to be an error in Books OnLine regarding sp_updatestats. It says:

"Requires membership in the sysadmin fixed server role, or ownership of the database (dbo)."

However, using an account in db_owner, I get this error when I run it:

"User does not have permission to perform this action."

Yet I am able to use 'update statistics' on each of the tables -- including the sys.queue_message_x tables -- that sp_updatestats affects when I run it under a sysadmin account.

Thanks,

Ron Rice