How can I store data to DataBase
Hello everyone!
I want to know abt to save data to database.
I have no idea abt this.
Plz help me.
I'm using ASP for serverside
zikky
August 5,
You can post the data by XMLHTTP to the server. Maybe you can send the grid output as XML and parse the XML at the server this would makes it flexible.
You need some scripting knowlegde to do so.
John Ophof
August 5,
Thanks for the idea. May I ask where could I get a suffucient reference to use XMLHTTP.
glennlosentes [philippines-davao]
August 13,
function sendxmlstring (curl, cstr, ocallback ) {
// Create xml object with default header and primary node
if (is_ie) {
oxmlhttp = new ActiveXObject( "msxml2.XMLHTTP" );
} else {
oxmlhttp = new XMLHttpRequest();
}
if (is_gecko) {
oxmlhttp.onload = ocallback;
oxmlhttp.open("POST", curl, false);
} else {
oxmlhttp.open( "POST", curl, false );
oxmlhttp.onreadystatechange = ocallback;
}
oxmlhttp.send( cstr );
}
Maybe this helps sending cstring to the server. Don't forget your call backroutine.
Out of openmodeling software.
John Ophof http://open-modeling.sourceforge.net
August 13,
how would i insert a data into the database from html forms using xmlhttp?
i hope you could help me...
glennlosentes
August 26,
glennlosentes, you use javascript function for that. What you do is build up a string (cstr as in his example)
usually in this format :
myfirstvar=jouma&mysecondvar=joupa
should be something like :
cstr = "myfirstvar=" + document.myForm.inputobject.value + "&" + document.myForm.inputobject2.value
Then just use xmlhttp to pass it to an ASP page. Then you'll use Request object to get the data and do whatever with it.
AcidRaZor
August 26,
AcidRaZor thanks... i also thought that it would also work on post method..
thanks a lot..
glennlosentes
August 26,
I developed the html form.
in this, I entered the data but I want to store this data into the database.
I used the Servlet concept. and database connectivity is JDBC.
Rushi Mani
March 10,