|
I'm stumped. I can query my Access DB just fine, but even a simple insert, like:
insert into test (test_num) values (123)
fails. I've triple checked my code, which is basically just a cut and paste of the various examples I've found. When I catch the exception at the ExecuteNonQuery call, I get either:
"Operation must be an updateable query"
or
"Syntax error in INSERT INTO statement"
All my statements run just fine directly in Access. I've also gone into IIS and set the priviledges to read/write on the .MDB file. What am I missing?
Thanks,
Marc
|
|
|
|
|
You need to set the NTFS permissions to allow the annonymous account (either IUSR_MachineName or ASPNET) to read and write to the MDB file and the folder it's stored in. It needs to write to the folder to create the LDB locking file. (You should move the folder outside of your web-site first. )
|
|
|
|
|
Good grief. That worked. I had set the file permissions in IIS, but not the file permissions in NTFS. After my test query ran, my other query still failed. Turns out you can use the word "PASSWORD" as part of a "where" clause, but it must be a keyword, because you can't use it as part of an "insert" statement. I had to change it to "PASSWRD".
Thank you very much for your help!
Marc
(another bug bites the dust!)
|
|
|
|
|
Hi,
There are couple of web form page. when user modify any data in any one of the webform page and try to navigate to another page, we have to inform the user that u made some changes in data, do u want to "commit" the changes u made.
in which event we can inform him.......how we can identify he/she made changes in data?
Can u suggest any solution
------------------------------------------
Regards,
Jude Asis Prabhu
Chennai,India.
Email:rjaprabhu@netscape.net
|
|
|
|
|
Well Jude..
If ur using Select Boxes then there is this on change event.I guess its therE for other controls like text boxes too.If not whenever they get focus and then lose focus compare the values at the 2 instants.and then u can ask the user the question.hope it helped.
Why Need Parking lots in Bars when Drunken Driving is Prohibited
|
|
|
|
|
Pradhip,
Hey Pradhip..in ASP.NET we can have only text changed event only. ...so how we can find the text has changed when user clicks teh next page. There is no get focus and lostfocus event i think
------------------------------------------
Regards,
Jude Asis Prabhu
Chennai,India.
Email:rjaprabhu@netscape.net
|
|
|
|
|
Can anyone point me to an example of how to send an email using ASP.NET?
Thanks,
Marc
|
|
|
|
|
This is from memory (i'm not on a machine with vs.net), but try this:
using System.Web.Mail
...
...
MailMessage mm = new MailMessage();
mm.To = "anyone@anywhere.com";
mm.From = "anyone@anywhere.com";
mm.Subject = "subject";
mm.Body = "body text";
SMTPMail.Send(mm);
Easy, huh?
Attachments are also really easy to handle - check out the MSDN for more info.
Cheers,
Paul
|
|
|
|
|
Gee, that was easy. Thanks for the info!
Marc
|
|
|
|
|
No problem, glad I could help.
Cheers,
Paul
|
|
|
|
|
Hi there,
I have a custom web control, so I generate all html code myself. Now, how do I implement file uploading? In a user control I would use HtmlInputFile, but what should I do in a custom web control?
Thanks,
kind regards,
Ludwig
|
|
|
|
|
you use the same class.
override CreateChildControls to create the control and add it to the Controls collection.
|
|
|
|
|
At the moment, all code is rendered in the onRender() method. The browse button (to select a file) should be placed on a particular place on the screen. If I create the control in CreateChildControls, how do I position it on that right spot?
Thanks for the answer!
Kind regards,
Ludwig
|
|
|
|
|
I found the solution, I can access the files simply by using Page.Request.Files !
|
|
|
|
|
Hi:
Code In ASP:
objMapSvrMngr = Server.CreateObject("GMWebMap.MapServerManager")
sCompiledMDF = Session("GWMTutorialDir") + "\Lesson6.cmdf"
objMapSvr = objMapSvrMngr.MapServer(sCompiledMDF)
objMapSvr.LoadMSS(sCompiledMDF)
......
Code In ASP.NET:
Imports System.Data.OleDb
Imports ACGMLib.ActiveCGMClass
Imports MAPSRVLib
......
Dim objMapSvrMngr As MAPSVRMNGRLib.MapServerManager
Dim objMapSvr As MAPSRVLib.IDGWMMapServerHelper
.......
objMapSvrMngr = Server.CreateObject("GMWebMap.MapServerManager")
sCompiledMDF = Session("GWMTutorialDir") + "\WebMapTest\Lesson6.cmdf"
objMapSvr = objMapSvrMngr.MapServer(sCompiledMDF)
objMapSvr.LoadMSS(sCompiledMDF)
......
Why objMapSvr = objMapSvrMngr.MapServer(sCompiledMDF) is not work?
|
|
|
|
|
Hmm, Whats the error?
There are a couple strange lines in your code, but that may be how you want it. Pulling directories from session and whatnot...
|
|
|
|
|
Hi,
when user want to delete a record in ASP.NET(using VB.NET)
i want to raise a confirm method to the user whether he really wants to delete.
if user clicks yes, it should delete the record.if he clicks NO then it should not delete the record
how is it possible using VB.NET to raise the confirm method when user clicks the delete button (which is server control).
Kindly help me
------------------------------------------
Regards,
Jude Asis Prabhu
Chennai,India.
Email:rjaprabhu@netscape.net
|
|
|
|
|
hi,
we have done simpler kind of thing..
let me explain whatever we have done.
"btnCheckIn" name of the server side button.
code for adding javascript for server side button:-
btnCheckIn.Attributes.Add("onclick", "Checkin()")
This will call javascript "Checkin" function in the client machine
in javascript function we have writen confirm javascript code..
if "yes"
location.href="1.aspx"
we are passing the deleting "ids" as Querystring to that page with flag..
based on the flag condition we are deleting the record..
it is working fine ,if u feel it is good try out this
all the best,
regards
yesu
|
|
|
|
|
hi,
we have done simpler kind of thing..
let me explain whatever we have done.
"btnCheckIn" name of the server side button.
code for adding javascript for server side button:-
btnCheckIn.Attributes.Add("onclick", "Checkin()")
This will call javascript "Checkin" function in the client machine
in javascript function we have writen confirm javascript code..
if "yes"
location.href="1.aspx"
we are passing the deleting "ids" as Querystring to that page with flag..
based on the flag condition we are deleting the record..
it is working fine ,if u feel it is good try out this
all the best,
regards
yesu
|
|
|
|
|
Yesu,
thank u man its working...
Thanks for your timely help
------------------------------------------
Regards,
Jude Asis Prabhu
Chennai,India.
Email:rjaprabhu@netscape.net
|
|
|
|
|
is asp source for this website available?
aside from IbuySpy portal website,where can i find
asp portal website source for free?
thanks!
|
|
|
|
|
I think the message forum is available, Chris just asks you leave the Powered By: CodeProject logo or something like that...
Actually I recall someone out there in CP land converting the ASP to PHP, so I think you have a few options there.
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
sorry,what did you mean by
"Chris just asks you leave the Powered By: CodeProject logo or something like that..."
thanks!
|
|
|
|
|
What is my question? Hmm...
Is there a clever .Net way to achieve what we used to do with includes with regard to headers and footers?
In ASP you might do something like this ....
<%Option Explicit%>
<%
Response.Write "HelloWorld"
%>
This is all fine and dandy, unless you want to actually do something dynamic in your header or footer (not out of the question) and pass through variables and such. For example, I often draw the side naviagtion in the header include and pass through the security level of the user (which alters the available menu options) so I usually do it like so...
<%Option Explicit%>
<%
DrawHeader iLoginSecurityLevel
Response.Write "HelloWorld"
DrawFooter iLoginSecurityLevel
%>
Ok, so now the guts of my question with that in mind would be, is there a nice way to do this via perhaps the code-behind architecture and inheritance in ASP.Net?
I am thinking that perhaps you'd have your own page which would inherit from
Page and would implement a method to draw the header and footer on every page.
If so, at what stage would I be writing the header and footer? Is there Page events that I could respond to before and after the .aspx stuff is written?
Just wondering if anyone has taken this approach really and whether it worked out well.
Ta in advance
JBoy
Talk is cheap because supply exceeds demand
|
|
|
|
|
You can actually still use the #Include if you would like even with .aspx pages, however to answer you question there is a .NET way of handling this. This is through the process of what Microsoft calls User Controls (file type .ascx ). I have included a link below to a MSDN page that shows how to convert from the older style to the new user controls. I hope this answers your question.
Converting a Web Forms Page to a User Control [New Window]
Nick Parker
|
|
|
|