|
Hi.
I insert new rows in a *.mdb file using (rs.AddNew)
It works fine on localhost but when I try it on the server I get :
Microsoft JET Database Engine error '80040e09'
Cannot update. Database or object is read-only
the Directory containing the file that makes the insertion has write permissions..
any suggestions please ?
|
|
|
|
|
Check the optional settings in your connection object... the default is read-only, but changing the mode or cursor type can override that - I forget which. Sorry for being so vague, but it's 2AM and I haven't looked at my last web project for a month, but I ran into the same problem... A change to the connection string or the parameters passed with the .Open command fixed it.
"The Lion shall lie down with the Lamb; but the Lamb will not get much sleep..." Lazarus Long
|
|
|
|
|
thank u
the connection is ok.. as i said it worked on localhost
the solution is i need to give write permission to the database folder .. not only the script folder coz Access needs to create *.ldb file (a locking information file)
|
|
|
|
|
Ah, I'll have to remember that in case I run into it again! Glad you solved it.
"The Lion shall lie down with the Lamb; but the Lamb will not get much sleep..." Lazarus Long
|
|
|
|
|
Hi all,
whats "onfiltered" DHTML event used for?
Thanks alot.
|
|
|
|
|
|
In JavaScript, in my script (i.e. not in the XHTML code), how would I add multiple functions to an event handler? For example, in JS you can do this:
onload = MyFunction();
And in C# you can do this:
event = EventHandler
event += AnotherEventHandler
But can you do something similar in JS?
-Domenic Denicola- [CPUA 0x1337]
“I was born human. But this was an accident of fate—a condition merely of time and place. I believe it's something we have the power to change…”
|
|
|
|
|
Perhaps you can create a single set of functions that serve as an event dispatcher and bundle them up as a .js:
function HookEvent(oElement, cEventName, fFunction) {
var iIndex = -1;
if (oElement.EventList == null)
oElement.EventList = new Array();
else
iIndex = FindEventIndex(oElem, cEventName);
SetEventFunction(oElement, cEventName, iIndex, fFunction);
}
function FindEventIndex(oElem, cEventName) {
var aEvents = oElem.EventList;
if (aEvents != null)
{
for (var iLup = 0; iLup < aEvents.length; iLup++)
{
if (aEvents[iLup][0] == cEventName)
return iLup;
}
}
return -1;
}
function SetEventFunction(oElement, cEventName, iIndex, fFunction) {
if (iIndex > -1)
{
var aEventFcns = oElement.EventList[iIndex][1];
aEventFcns[aEventFcns.length] = fFunction;
}
else
{
oElement.EventList[oElement.EventList.length] = new Array(cEventName, new Array(fFunction))
}
eval("oElement." + cEventName + " = ProcessEventHandlers");
}
function ProcessEventHandlers() {
var oElem = window.event.srcElement;
var cEvent = "on" + window.event.type;
var iIndex = FindEventIndex(oElem, cEvent);
if (iIndex > -1)
{
var aFcns = oElem.EventList[iIndex][1];
if (aFcns == null)
return;
for (var iLup = 0; iLup < aFcns.length; iLup++)
{
eval(aFcns[iLup]);
}
}
}
NOTE: THis is just something i typed in and is not guaranteed to work. Just for example purposes.
onwards and upwards...
|
|
|
|
|
First, don't use eval. Never ever as it'll recompile the current script plus the stuff inside the eval
To attach more than one event handler to an element, use the method attachEvent (IE) or for w3c browsers addEventListener[^]:
<br />
var el = document.getElementById("foo");<br />
el.attachEvent("onclick", foo);<br />
el.attachEvent("onclick", function () { alert("2nd handler"); });<br />
<br />
function foo(event) {<br />
alert("1st handler");<br />
}<br />
|
|
|
|
|
I have a desktop, non-networked, standalone program that writes HTML text out to a set of files based on the data that it has processed, making a nice user interface for those that need to review what data was generated.
I want to provide the capability to have a second program be started with a filename as a command line parameter (?) when a user clicks on a filename within the HTML, to perform some additional processing on the contents of the selected file. I am guessing that this would have to be an anchor tag of some sort, but I don't know what kind and can't seem to find anything about it.
How can I write the HTML to start a specific program with the selected file as a parameter when a link is selected? Can I do this without having the file extension associated with my program?
Thanks,
Dave
"You can say that again." -- Dept. of Redundancy Dept.
|
|
|
|
|
The only way that I'm aware of is by having file associations. Otherwise, it's ActiveX time.... good luck.
onwards and upwards...
|
|
|
|
|
Do you know of anything within any of the scripting variations (VBscript, JavaScript, etc) that could be called when a link is selected, and that then could start execution of a program?
I would like to stay away from having to create file associations because if the data, the HTML, and the program are provided on a CD-ROM, for example, then there really isn't any "installation." It would just appear to the user that when they selected a certain link, a program would start using the selected file.
"You can say that again." -- Dept. of Redundancy Dept.
|
|
|
|
|
David Chamberlain wrote:
Do you know of anything within any of the scripting variations (VBscript, JavaScript, etc) that could be called when a link is selected, and that then could start execution of a program?
Due to security concerns and "sandboxing", these script languages are designed not to allow you to spawn an executable program from browser scripting.
David Chamberlain wrote:
It would just appear to the user that when they selected a certain link, a program would start using the selected file.
By just specifying the data file, the OS will prompt them the first time to browse for the program to open the file with. Instruct them to browse to the CD.
Sorry, those are the best answers I can give..
onwards and upwards...
|
|
|
|
|
If you are hosting the browser control in your app yuou can use window.external to route the click to your app and launch the other program from there.
I know there are some examples out there, I just can't remember them at the moment.
|
|
|
|
|
I would like to change Text on a webpage on the fly. I know about the innerText property for ie. I cann't use this however becuase I am not using ie. Or netscape for that matter. I need a way that is very browser nonspecific. Is there anyway to do this using javascript or JSP. I want to be able to change the text on the screen without reloading the page.
Thank you.
Mardigin.
|
|
|
|
|
hi..
you can put that portion that changes in a separate frame(myFrame)..
then make a link with target = myFramee .. when the user clicks the link the page in (myFrame) loads with new values So you can make it in asp to accept arguments..Got it ?
|
|
|
|
|
|
Hello:
I want to try writing perl scripts on Windows 2000 Professional, for a web application. I am using IIS 5.0 as web server.
How can I do that? Any advices or links to examples will be highly appreciated. Thanks
~~~~Pankaj~~~~
Follow your goals, Means will follow you ---Gandhi---
|
|
|
|
|
Here[^] is the binary download for Perl on WinNT. I don't know whether it will work on Win2KPro, but you might try it out. You can also download the source files from the same site - perhaps you can tweak it to run with IIS5.
"The Lion shall lie down with the Lamb; but the Lamb will not get much sleep..." Lazarus Long
|
|
|
|
|
|
Hi,,
I make a page Save.asp that gets some data from a form in another page.. (method=Get)
Save.asp saves data to a DB then displays a success message..
the problem :
when the user press (Refresh or reload) in the browser the data is saved again..
How to prevent this from happenning ?
|
|
|
|
|
hspc wrote:
when the user press (Refresh or reload) in the browser the data is saved again..
HS,
Please post your code!
I believe I have seen this kind of thing before.
Tony
|
|
|
|
|
Having a stab here...
Try Request.ServerVariables("HTTP_REFERER") in Save.asp to see where they came from. If coming from Save.asp then the refresh is happening.
I'm not really sure if this would work, but I'd giv this a go first. Failing this, I would then think about either passing a variable from the first page to the second, or use Session("SessionID") which is unique per browser ..ie
(SQLServer7)
sSQL="IF Exists(SELECT * FROM tblInsert WHERE sessionID='"&Session("SessionID")&_
"') SELECT -1 ELSE BEGIN"&_
" INSERT INTO tblInsert(fields...)VALUES(values...);"&_
" SELECT 0 END"
run this, if -1 then already inserted
OR
set a session variable to say that this user has already submitted (if allowing for multiple submissions from same session, get the input page to reset the session variable)
Actually, I like the last the best, if REFERER fails.
Dave McRae
|
|
|
|
|
Thanks..
I loved the REFERRER Idea (even though I did not try it yet)
I think the Idea of SessionID will prevent the user from enterring new data in the same session .. also SessionID can be assigned to another user after the current one logs off.
the session variable is also great
the way I make it now is to let the save page redirects the user to another page (I don't like it coz it needs to make a trip to the client..Also won't work if a proxy exists)
|
|
|
|
|
ahh - yeah - I dont mind the redirect idea
(There are many ways to skin this cat )
also response.transfer (if you're using IIS5.0 or better - not an option with IIS4.0) would solve your worries with page redirects and be very good looking!!
Dave McRae
|
|
|
|