|
hi all,
in my application i store some data in Registry. Everything is ok except one . when i run my application on vista machine as limited user (not as admin) then Following error occured
"Requested registry access is not allowed"
anybody have idea that how can i resolve this Error ?
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
What part of the registry are you reading/writing?? What's the registry path you're using??
|
|
|
|
|
hi,
i am using following path
HKEY_LOCAL_MACHINE\SOFTWARE\
at above path, i am try to creating a key. but failed on vista (limited account).
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
Normal users are not allowed to create keys under the HKLM\SOFTWARE key. This can only be done by the admin and is usually done at application installation time, not at run time.The keys under this one should be Company Name or Application Name keys, under which application values should be created.
|
|
|
|
|
sir,
can you provide me that in which part of registry, normal user are not allowed to create registry key( Including all root key).
also Please suggest, whether there are any method(or link) , by which normal users are allowed to create key under HKLM\Software ?
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
Rupesh Kumar Swami wrote: can you provide me that in which part of registry, normal user are not allowed to create registry key( Including all root key).
It's easier to do the opposite. Users are able to create keys under various parts of the HK_CURRENT_USER root.
Rupesh Kumar Swami wrote: Please suggest, whether there are any method(or link) , by which normal users are allowed to create key under HKLM\Software ?
I hate repeating myself. There isn't any. The only "workaround" you have is to, during installation of your app, create a Company and/or Application named key under HKLM\SOFTWARE, then give the appropriate users group permissions to read and write under that key. This is NOT a good idea!
|
|
|
|
|
i have a problem while reading the out from a console, i created a process n passed the ping command with ip address, i can able to read the whole output at once but i should read the same way as we get in the cmd, ie., line by line,
plz try to give the solution
|
|
|
|
|
|
Hi all,
How i can get the names of all the child from( in a MDI form).
Give me a idea...
Thanks in advance
Senthil.S
Senthil S
Software Engineer
|
|
|
|
|
try this
For Each ChildForm As Form In Me.MdiChildren
MsgBox(ChildForm.Name)
Appplication.DoEvents
Next
|
|
|
|
|
Do not use Application.DoEvents() in this code. You don't need it and it causes problems you really wouldn't think about.
|
|
|
|
|
OK....
i have always used it extensively and havent had any problems...
what are the problems that one can expect...???
|
|
|
|
|
Application.DoEvents forces your app to give up control to it's Message Pump. If the UI isn't controlled properly (or is buggy), the user can start clicking on anything they want and the app will dutifully start executing other event handler code, while still processing thie loop you put the DoEvents in. If the code isn't so simple, this can generate very unexpected results that are difficult to find.
|
|
|
|
|
thanks, appreciate your help!
|
|
|
|
|
A quick explanation of what I am trying to achieve: for each bond that is selling in the stock market, there will be an issue date, maturity date, frequency of interest payments and lastly the interest rate. What I want is to have a function that allows me to input a date any time before the bond matures, and give me as an output a series of outstanding cashflows and the corresponding dates.
Explanation of the variables in the code
Valdate = todays date
Ipos = indicator +1 or -1 depending if I have bought or borrowed the bond
Notional = amount of bond
D1 = date of bond issue
D2 = date of maturity
Freq = frequency of interest payments
Coupon = interest rate
V() = vector of all cashflow dates for the bond
Cashflow = 2 by p matrix of the bond (dates and corresponding amounts)
Code:
Function bondcashflow(valdate, ipos, notional, d1, d2, freq, coupon)
Dim p, m As Integer
Dim v()
Dim cashflow()
ReDim cashflow(2, p) As Variant
Dim n As Long
n = Application.Round(DateDiff("d", d1, d2) / 365 * freq, 0)
For i = 0 To n - 1
If freq = 1 Then
v(i) = DateAdd("yyyy", 1 * i, d1)
ElseIf freq = 2 Then
v(i) = DateAdd("q", 2 * i, d1)
ElseIf freq = 4 Then
v(i) = DateAdd("q", 1 * i, d1)
ElseIf freq = 12 Then
v(i) = DateAdd("m", 1 * i, d1)
End If
m = 0
If valdate < v(i) Then
m = m + 1
End If
Next i
p = n - m
For k = 1 To p
cashflow(1, k) = v(k + m - 1)
Do While k < p
cashflow(2, k) = ipos * coupon * notional
Loop
Next k
cashflow(2, p) = ipos * (notional + coupon * notional)
bondcashflow = cashflow
End Function
|
|
|
|
|
Danisto wrote: What I want is to have a function that allows me to input a date any time before the bond matures, and give me as an output a series of outstanding cashflows and the corresponding dates.
OK. So what's the problem?
|
|
|
|
|
Danisto,
Just a brief glance through your code shows that in the For loop at the end you've embedded "Do While k < p". The loop has no exit; that is, it's an infinite loop.
Also, the ReDim of the cashflow array uses p as the second dimension, but p hasn't been assigned a value at that point.
Is your Code block really supposed to be pseudo-code?
Regards,
Steve Erbach
Neenah, WI
|
|
|
|
|
Hi,
I have a nested datagrid which has drop down lists inside it. Which are populated as follows...
Private Sub loadSystemsTables(ByRef dg As DataGrid)
'loads the dropdownlists for the editors
Dim db As New database
Dim SystemDS As DataSet
Dim evtHandle As New DataGridItemEventHandler(AddressOf childItemDataBound)
Dim SystemsSQL As String
If Not dg Is Nothing Then
'we have a DataGrid
SystemsSQL = "SELECT * FROM tblSystems"
SystemDS = db.db_getDataSet(SystemsSQL)
AddHandler dg.ItemDataBound, evtHandle
dg.DataSource = SystemDS
dg.DataBind()
Else
MessageLabel.Text = "Couldnt find DataGrid"
MessageLabel.UpdateAfterCallBack = True
End If
End Sub
Public Sub childItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs)
'Dim sysID as integer
'Dim lbl As Label
'lbl = e.Item.FindControl("SystemsIDLabel")
'If Not lbl Is Nothing Then
' sysID = lbl.Text
'End If
Dim ddl As Anthem.DropDownList
ddl = e.Item.FindControl("RoleDropDown")
If Not ddl Is Nothing Then
loadRoleEditors(sysID, ddl)
End If
End Sub
Inside the inner datagrid I have the following items...
<anthem:label runat="server" id="SystemIDLabel">]]>
<anthem:dropdownlist runat="server" id="RoleDropDown" cssclass="DDLSize5">
What I need to know is how to get the value of the "SystemIDLabel" label so I can pass it to the loadRoleEditors sub as I need to set the drop down lists to previously selected values. The value is displayed when the code is run, but if I uncomment the section in sub childItemDataBound() then I get Null. What I think is happening is the sub is running before the value is inserted into the datagrid.
Anyone know how to get this, or is there another way.
Cheers
Andy
|
|
|
|
|
Hi Friends,
I am developing on vb application in my local system.
this application should be used by others users in my team to enter their ot details and everything.
In that application throughout i am using the connection string as
Conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=\\sanramal\sanramal1\overtime log\Overtime Log\Data\OT_Log.mdb"
This application permanently installed in local system and the system name is sanramal.
The mdb file is presented in sanramal1\overtime log\overtime log\data\ot_log.mdb
so in the connection string i have given my system name followed by the shared folder which includes the mdb file.
I have done with Package and Development Wizard.
i install this in other desktop.
But when i started working (test) in that desktop, it has given error
"cannot access \\sanramal\sanramal1\overtime log\Overtime Log\Data\OT_Log.mdb - its exclusively opened by other user...."
Please help me to resolve this problem.
Its very very urgent.
Thanks in Advance,
|
|
|
|
|
hi man
let me ask you few Questions to understand your Question.
Where is the MDB File, is it localy on your Machine?
If its a share, does your Users have access to it and Permissions?
Are your Users Connected to the network? (want to make sure)
aaraaayen your Error is simple to solve, it simply means your application cant find the DB, you need to make the correct mapping to your DB,
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Hi Vuyiswa,
Thanks lot.
Yes mdb file is located in my machine.
It is shared in a folder...But i dont know really about the permission...
Users are connected to the network....
Error I am receiving:
Microsoft jet databse engine cannot open the file (path). It is already opened exclusively by another user, or you need permission to view its data...
Please help me.
Expecting your favourable reply.
Regards,
|
|
|
|
|
Hi,
i experienced the similar problem once...
it happened when the program tries to read a table that is opened by a user.
try to close all tables and run the app.
|
|
|
|
|
Yes...but i closed the mdb file b4 opening the application..
what kind of permission i have to give for that file?
Thanks lot for your reply.
Regards,
|
|
|
|
|
mmmm..
permission set as normal, you can try to add 'everyone' with read and write....
here are 2 other suggestions...
1. maybe someon else has this file open. check for the '.ldb' file in that directory then you wil know.
2. why not create an odbc connection under admin tools to this mdb file.
then in you code you can call up this datasource eg.i have always used this and it hasn't given me any errors thus far....
here is the connectionstring = "DSN=TEST;PWD=PASSWORD"
where 'TEST' is the datasource name and password if any password!
sorry but this all i can think of at this moment, will check on other solutions.
|
|
|
|
|
Thanks lot.
Yes But I am having one doubt with DSN.
When i create and use with(System DSN)...then i need to create dsn in all the systems? or is there any options in Package and Deployment, that will automatically create dsn in all the systems when we install this application?
Expecting your reply.
Regards,
|
|
|
|