...

View Full Version : what error is this??



mivec
08-11-2005, 09:56 AM
can someone tell me what kind of error is this???????and how to get rid of it?i am goind nuts already!!!arrgghh!!!



Error Type:
ADODB.Recordset (0x800A0CB3)
Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype

Roelf
08-11-2005, 10:06 AM
google it, or show us the code that produces this error. Otherwise we cannot help you

mivec
08-11-2005, 12:47 PM
hrm......i dunno whats wrong with it either....but i have another error



Error Type:
ADODB.Recordset (0x800A0CB3)
Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.
/eventDone.asp, line 13


my code in the upload page:



<%@ LANGUAGE="VBSCRIPT" %>
<!-- #include file = "adovbs.inc" -->
<!-- including the function definition file -->
<!-- #include file = "FuncDef.asp" -->
<!-- This file is to update the database after the confirmation -->

<%
Dim SQLtxt
SQLtxt = "SELECT * from tEvents"

OpenMyDB dbfile, SQLtxt

DBRecordset.AddNew
DBRecordset("evTitle") = request.form("txtEvName")
DBRecordset("evVenue") = request.form("txtEvLocation")
DBRecordset("evSpeaker") = request.form("txtEvHandler")
DBRecordset("evDate") = request.form("txtEvDate")
DBRecordset("evSynopsis") = request.form("txtaSysnopsis")
DBRecordset("evSignUp") = request.form("txtSign")
DBRecordset("evWebLink") = request.form("txtWeblink")
DBRecordset("evBorderColor") = request.form("txtCol")
DBRecordset.Update

CloseMyDB
%>


my code in the FuncDef.asp



<%
Dim DBConnection
Dim DBRecordset
Dim dbfile
Dim usrnm, passw

dbfile = Server.MapPath(".")&"\iee.mdb"


Sub OpenMyDB(dbfile, SQLText)
set DBConnection = Server.CreateObject("ADODB.Connection")
set DBRecordset = Server.CreateObject("ADODB.Recordset")


DBConnection.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&dbfile&";Persist Security Info=False"
DBConnection.open
DBRecordset.open SQLText, DBConnection, adOpenDynamic '(this line works the same as below)
'Set DBRecordset = DBConnection.execute (SQLText, 1)
End sub


Sub CloseMyDB()
DBConnection.close
Set DBConnection = Nothing
End sub


%>



line 13 is at this part "DBRecordset.AddNew"......i don't know what the hell is wrong.....it looks fine to me...

BaldEagle
08-11-2005, 08:53 PM
You need to add a lock type to your recordset open statement. Also you should close your recordsets before closing your db connection.

BaldEagle

mivec
08-11-2005, 09:16 PM
You need to add a lock type to your recordset open statement. Also you should close your recordsets before closing your db connection.

BaldEagle

errr...i dun get u.....sorry...noob in asp here....

BaldEagle
08-11-2005, 09:37 PM
Read this:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdprolocktype.asp

You may want to pass another variable to your OpenMyDb function/sub, that being the locktype and ultimately you could add a fourth as the cursortype. Then the function would be a little more universal. Maybe you should google recordsets and see what kind of info there is available. As for closing your recordset just use this syntax:

rs.Close
Set rs = Nothing

You should also set your connection to Nothing when you are done with it.

Good luck,

BaldEagle

BaldEagle
08-11-2005, 09:41 PM
I should have given you this link to begin with.

http://www.w3schools.com/ado/prop_rs_locktype.asp

BaldEagle

mivec
08-11-2005, 10:20 PM
Read this:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdprolocktype.asp

You may want to pass another variable to your OpenMyDb function/sub, that being the locktype and ultimately you could add a fourth as the cursortype. Then the function would be a little more universal. Maybe you should google recordsets and see what kind of info there is available. As for closing your recordset just use this syntax:

rs.Close
Set rs = Nothing

You should also set your connection to Nothing when you are done with it.

Good luck,

BaldEagle

thanks for the reply but i think i hv done that part and still just cant get hold of my statements...if u check on the funcdef.asp file, i alwiz close it and u can see that it's defined there already....i still don't know whats wrong

BaldEagle
08-11-2005, 11:17 PM
thanks for the reply but i think i hv done that part and still just cant get hold of my statements...if u check on the funcdef.asp file, i alwiz close it and u can see that it's defined there already....i still don't know whats wrong


<%
Dim DBConnection
Dim DBRecordset
Dim dbfile
Dim usrnm, passw

dbfile = Server.MapPath(".")&"\iee.mdb"


Sub OpenMyDB(dbfile, SQLText)
set DBConnection = Server.CreateObject("ADODB.Connection")
set DBRecordset = Server.CreateObject("ADODB.Recordset")


DBConnection.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&dbfile&";Persist Security Info=False"
DBConnection.open
DBRecordset.open SQLText, DBConnection, adOpenDynamic '(this line works the same as below)
'Set DBRecordset = DBConnection.execute (SQLText, 1)
End sub


Sub CloseMyDB()
DBConnection.close
Set DBConnection = Nothing
End sub
%>

The statement in red needs another variable which is the locktype.

DBRecordset.open SQLText, DBConnection, adOpenDynamic, adLockOptimistic


I see no recordset closing.

BaldEagle

mivec
08-12-2005, 08:07 AM
<%
Dim DBConnection
Dim DBRecordset
Dim dbfile
Dim usrnm, passw

dbfile = Server.MapPath(".")&"\iee.mdb"


Sub OpenMyDB(dbfile, SQLText)
set DBConnection = Server.CreateObject("ADODB.Connection")
set DBRecordset = Server.CreateObject("ADODB.Recordset")


DBConnection.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&dbfile&";Persist Security Info=False"
DBConnection.open
DBRecordset.open SQLText, DBConnection, adOpenDynamic '(this line works the same as below)
'Set DBRecordset = DBConnection.execute (SQLText, 1)
End sub


Sub CloseMyDB()
DBConnection.close
Set DBConnection = Nothing
End sub
%>

The statement in red needs another variable which is the locktype.

DBRecordset.open SQLText, DBConnection, adOpenDynamic, adLockOptimistic


I see no recordset closing.

BaldEagle

err......i tot i have a recordset closing?if not, then where do i do it/put it?

Roelf
08-12-2005, 12:51 PM
err......i tot i have a recordset closing?if not, then where do i do it/put it?
In your CloseDb sub:


Sub CloseMyDB()
DBRecordset.close
Set DBRecordset = Nothing
DBConnection.close
Set DBConnection = Nothing
End sub

mivec
08-14-2005, 03:40 PM
In your CloseDb sub:

Code:

Sub CloseMyDB()
DBRecordset.close
Set DBRecordset = Nothing
DBConnection.close
Set DBConnection = Nothing
End sub



ok i hv done all the changes in the code where i hv already added adLockOptimistic and also the changes done to my CloseMyDb function...but it sill doesn't work and i am getting this error:



Error Type:
Microsoft JET Database Engine (0x80040E09)
Cannot update. Database or object is read-only


i checked it...it's not an read only db...it's an archive...so what da hell is wrong now???

cheers :(

miranda
08-14-2005, 05:25 PM
is the database located in a directory with read/write permissions?

Also have you thought of just inserting the record using a SQL INSERT statement instead of using ADO?

Cyberlord
08-14-2005, 05:34 PM
Hello,

the solution is simple:

just add write-access for the user IUSR_COMPUTERNAME for the access database-file (.mdb).

cheers

mivec
08-14-2005, 05:41 PM
Hello,

the solution is simple:

just add write-access for the user IUSR_COMPUTERNAME for the access database-file (.mdb).

cheers

err....i dunno how i can do that.....can u guide me??? i read from another forum and tried to uncheck the "read-only" checkbox...but whenever i hv updated it and click ok and i return to it's properties, it's still checked as read-only...whats the problem??

Cyberlord
08-14-2005, 05:54 PM
What os do you have?

It should look like this: (see attachement)

cheers

miranda
08-14-2005, 06:26 PM
If this is hosted offsite by a web hosting company and they do not have a utility to set permissions, you will need to have them set the permissions to read/write.

If you have it on your local computer then click Control Panel > Administrative Tools > Internet Services Manager select the directory your database is in and either right click it or go to action then select properties check the box that says Write click Apply then click OK you now have read and write permissions available

mivec
08-14-2005, 07:20 PM
What os do you have?

It should look like this: (see attachement)

cheers

yes i manage to get it....but i hv checked the FULL ACCESS checkbox...but i am still getting the same problem.

and fyi, i am trying to connect the db and my pages locally. they are done locally. not tru a webserver...going nuts now

mivec
08-14-2005, 09:17 PM
ok now i manage to get it working BUT...not FULLY functioning properly...once i uploaded the stuff into the DB....the DB doesn't have anything.....no data which was uploaded!....whats wrong wid it now??

pls help....going nuts :( :(

mivec
08-15-2005, 09:37 PM
Anyone????

miranda
08-15-2005, 10:13 PM
When you use ado to add a new record you should do something to your SQL statement to guarantee that you do not get any results. If you get a result then you will not be able to use the AddNew function


SQLtxt = "SELECT * FROM tEvents WHERE evTitle = '" & request.form("txtEvName") & "';"

mivec
08-16-2005, 09:20 AM
When you use ado to add a new record you should do something to your SQL statement to guarantee that you do not get any results. If you get a result then you will not be able to use the AddNew function


SQLtxt = "SELECT * FROM tEvents WHERE evTitle = '" & request.form("txtEvName") & "';"

not too sure what u mean but will try...the thing is...last time, i manage to do it without using the code that u hv given me......just SQLtxt = "SELECT * FROM tEvents" and followed by the necessary ado stuff and followed by the Addnew function and it worked....now i am bazzled!!! and i dunno whats wrong actually.....

ok...i tried what u adviced me...still the same problem...i shall attach the DB to show u whats wrong

the thing is...that error that i stated in this post is no longer there...means solved...but if u can see....whenever i insert data into my db, it does peform the insert as u can see the evID(primary key) is there and is moved to the next record waiting...but the data that i have typed is just not there....so what is the problem now??

million thanks to all who can help me here.... :(

neocool00
08-16-2005, 03:08 PM
@mivec,
Could you post your insert statement? If you are using the addnew method, are you sure that you are setting all of the fields before you call the addnew method?

mivec
08-16-2005, 07:38 PM
neocool and everyone,

ok..i'll post the code here and show u...but i remembered posting it early in this post but nvm...here it is again..

at FuncDef.asp:



<%
Dim DBConnection
Dim DBRecordset
Dim dbfile
Dim usrnm, passw

dbfile = Server.MapPath("iee.mdb")


Sub OpenMyDB(dbfile, SQLText)
set DBConnection = Server.CreateObject("ADODB.Connection")
set DBRecordset = Server.CreateObject("ADODB.Recordset")

DBConnection.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&dbfile
DBConnection.open
DBRecordset.open SQLText, DBConnection, adOpenDynamic, adLockOptimistic
End sub


Sub CloseMyDB()
DBRecordset.close
Set DBRecordset = Nothing
DBConnection.close
Set DBConnection = Nothing
End sub

%>


at the form tat is performing the inserting(eventDone.asp):



<%@ LANGUAGE="VBSCRIPT" %>
<% OPTION EXPLICIT
Response.expires = 0 %>
<!-- #include file = "adovbs.inc" -->
<!-- #include file = "FuncDef.asp" -->

<%
Dim SQLTxt

SQLTxt = "SELECT * from tEvents WHERE evTitle = '" & request.form("txtEvName") & "';"

OpenMyDB dbfile, SQLTxt

DBRecordset.addnew
DBRecordset("evTitle") = request.form("txtEvName")
DBRecordset("evVenue") = request.form("txtEvLocation")
DBRecordset("evSpeaker") = request.form("txtEvHandler")
DBRecordset("evDate") = request.form("txtEvDate")
DBRecordset("evSynopsis") = request.form("txtaSysnopsis")
DBRecordset("evSignUp") = request.form("txtSign")
DBRecordset("evWebLink") = request.form("txtWeblink")
DBRecordset("evBorderColor") = request.form("txtCol")
DBRecordset.Update

CloseMyDB
%>
<html>
<head>
<title>Events Upload Success!</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK href="ieeCSS.css" type=text/css rel=STYLESHEET>
</head>

<body background="images/bgpic.gif">
<table width="100%" border="0">
<tr>
<td align="right">&nbsp;<br><br><br></td>
</tr>
</table>
<table width="100%" border="0">
<tr>
<td width="20%"><img src="images/home_logo.gif" width="72" height="100"></td>
<td align="center"><img src="images/about.gif" width="98" height="100"><img src="images/com.gif" width="98" height="100"><img src="images/events.gif" width="98" height="100"><img src="images/events%20(4).gif" width="98" height="100"><img src="images/med.gif" width="98" height="100"><img src="images/pub.gif" width="98" height="100"></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
<table width="85%" border="0" align="right">
<form name="frmBack" method="post" action="eventUpload.asp">
<tr>
<td class="row4" align="center">Event Upload Successfull!

<br><input type="submit" name="Submit" value="Back">
</td>
</tr>
</form>
</table>
</body>
</html>


the values from eventDone.asp comes from this page(eventConfirm.asp):



<html>
<% If Trim(request.form("txtEvName")) = "" then%>
<head>
<title>Events Upload</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK href="ieeCSS.css" type=text/css rel=STYLESHEET>
</head>

<body background="images/bgpic.gif">
<table width="100%" border="0">
<tr>
<td align="right">&nbsp;<br><br><br></td>
</tr>
</table>
<table width="100%" border="0">
<tr>
<td width="20%"><img src="images/home_logo.gif" width="72" height="100"></td>
<td align="center"><img src="images/about.gif" width="98" height="100"><img src="images/com.gif" width="98" height="100"><img src="images/events.gif" width="98" height="100"><img src="images/events%20(4).gif" width="98" height="100"><img src="images/med.gif" width="98" height="100"><img src="images/pub.gif" width="98" height="100"></td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
</table>
<table width="85%" border="0" align="right">
<tr>
<td class="row4" align="center">Sorry, you did not fill in the event title!</td>
</tr>
</table>
</body>

<%Elseif Trim(request.form("txtEvLocation")) = "" then %>
<head>
<title>Events Upload</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK href="ieeCSS.css" type=text/css rel=STYLESHEET>
</head>

<body background="images/bgpic.gif">
<table width="100%" border="0">
<tr>
<td align="right">&nbsp;<br><br><br></td>
</tr>
</table>
<table width="100%" border="0">
<tr>
<td><img src="images/home_logo.gif" width="72" height="100"></td>
<td align="right"><img src="images/about.gif" width="98" height="100"><img src="images/com.gif" width="98" height="100"><img src="images/events.gif" width="98" height="100"><img src="images/events%20(4).gif" width="98" height="100"><img src="images/med.gif" width="98" height="100"><img src="images/pub.gif" width="98" height="100"></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
<table width="85%" border="0" align="right">
<tr>
<td class="row4" align="center">Sorry, you did not fill in the event location!</td>
</tr>
</table>
</body>

<%Elseif Trim(request.form("txtEvHandler")) = "" then %>
<head>
<title>Events Upload</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK href="ieeCSS.css" type=text/css rel=STYLESHEET>
</head>

<body background="images/bgpic.gif">
<table width="100%" border="0">
<tr>
<td align="right">&nbsp;<br><br><br></td>
</tr>
</table>
<table width="100%" border="0">
<tr>
<td><img src="images/home_logo.gif" width="72" height="100"></td>
<td align="right"><img src="images/about.gif" width="98" height="100"><img src="images/com.gif" width="98" height="100"><img src="images/events.gif" width="98" height="100"><img src="images/events%20(4).gif" width="98" height="100"><img src="images/med.gif" width="98" height="100"><img src="images/pub.gif" width="98" height="100"></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
<table width="85%" border="0" align="right">
<tr>
<td class="row4" align="center">Sorry, you did not fill in the event speaker!</td>
</tr>
</table>
</body>

<% Elseif Trim(request.form("txtEvDate")) = "" then %>
<head>
<title>Events Upload</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK href="ieeCSS.css" type=text/css rel=STYLESHEET>
</head>

<body background="images/bgpic.gif">
<table width="100%" border="0">
<tr>
<td align="right">&nbsp;<br><br><br></td>
</tr>
</table>
<table width="100%" border="0">
<tr>
<td><img src="images/home_logo.gif" width="72" height="100"></td>
<td align="right"><img src="images/about.gif" width="98" height="100"><img src="images/com.gif" width="98" height="100"><img src="images/events.gif" width="98" height="100"><img src="images/events%20(4).gif" width="98" height="100"><img src="images/med.gif" width="98" height="100"><img src="images/pub.gif" width="98" height="100"></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
<table width="85%" border="0" align="right">
<tr>
<td class="row4" align="center">Sorry, you did not fill in the event date!</td>
</tr>
</table>
</html>

<%else%>
<head>
<title>Events Upload</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK href="ieeCSS.css" type=text/css rel=STYLESHEET>
</head>

<body background="images/bgpic.gif">
<table width="100%" border="0">
<tr>
<td align="right">&nbsp;<br><br><br></td>
</tr>
</table>
<table width="100%" border="0">
<tr>
<td><img src="images/home_logo.gif" width="72" height="100"></td>
<td align="right"><img src="images/about.gif" width="98" height="100"><img src="images/com.gif" width="98" height="100"><img src="images/events.gif" width="98" height="100"><img src="images/events%20(4).gif" width="98" height="100"><img src="images/med.gif" width="98" height="100"><img src="images/pub.gif" width="98" height="100"></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
<table width="83%" border="0" align="right" class="forumline" cellspacing="1" cellpadding="4">
<tr>
<td height="28" colspan="2" align="center" class="rowbg">Confirm Event Upload</td>
</tr>
<tr>
<td width="30%" height="22" class="row1">Event Title :</td>
<td width="60%" class="row2" align=center><%=request.form("txtEvName")%> </td>
</tr>
<tr>
<td width="30%" class="row1">Event Venue :</td>
<td width="60%" class="row2" align=center><%=request.form("txtEvLocation")%></td>
</tr>
<tr>
<td width="30%" class="row1">Event Speaker :</td>
<td width="60%" class="row2" align=center><%=request.form("txtEvHandler")%></td>
</tr>
<tr>
<td width="30%" class="row1">Event Date : </td>

<td width="60%" class="row2" align=center><%=request.form("txtEvDate")%></td>
</tr>
<tr>
<td width="30%" class="row1">Event Sysnopsis :</td>

<td width="60%" class="row2" align=center>
<textarea name="textarea" cols="70" rows="4" ><%=request.form("txtaSysnopsis")%></textarea>
</td>
</tr>
<tr>
<td width="30%" class="row1">Event SignUp : </td>

<td width="60%" class=row2 align=center><%=request.form("txtSign")%></td>
</tr>
<tr>
<td width="30%" class="row1">Event Weblink : </td>

<td width="60%" class=row2 align=center><%=request.form("txtWeblink")%></td>
</tr>
<!--<tr>
<td width="30%" class="row1">Event Image : </td>
<td width="60%" class=row2 align=left><input name="urlFile" type="file" size="50"> </td>
</tr>-->
<tr>
<td width="30%" class="row1">Event Content Color : </td>

<td width="60%" class="row2" align="center"><%=request.form("txtCol")%></td>
</tr>
<!--<tr><td colspan="2">&nbsp;</td></tr> -->
<tr><td colspan="2" align="center" class="row4">
<form method="post" action="eventDone.asp" name="uploadOK" enctype="multipart/form-data">
<input type="submit" name="btnSend" value="Send">
<input type="hidden" name="txtEvName" value=<%=request.form("txtEvName")%>>
<input type="hidden" name="txtEvLocation" value=<%=request.form("txtEvLocation")%>>
<input type="hidden" name="txtEvHandler" value=<%=request.form("txtEvHandler")%>>
<input type="hidden" name="txtEvDate" value=<%=request.form("txtEvDate")%>>
<input type="hidden" name="txtaSysnopsis" value=<%=request.form("txtaSysnopsis")%>>
<input type="hidden" name="txtSign" value=<%=request.form("txtSign")%>>
<input type="hidden" name="txtWeblink" value=<%=request.form("txtWeblink")%>>
<input type="hidden" name="txtCol" value=<%=request.form("txtCol")%>>
</form>
</td>
</tr>
</table>

</body>
<%End If%>
</html>


and the values of this page comes from this page(eventUpload.asp):



<html>
<head>
<title>Events Upload</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK href="ieeCSS.css" type=text/css rel=STYLESHEET>
<script language="Javascript">
var perline = 9;
var divSet = false;
var curId;
var colorLevels = Array('0', '3', '6', '9', 'C', 'F');
var colorArray = Array();
var ie = false;
var nocolor = 'none';
if (document.all) { ie = true; nocolor = ''; }
function getObj(id) {
if (ie) { return document.all[id]; }
else { return document.getElementById(id); }
}

function addColor(r, g, b) {
var red = colorLevels[r];
var green = colorLevels[g];
var blue = colorLevels[b];
addColorValue(red, green, blue);
}

function addColorValue(r, g, b) {
colorArray[colorArray.length] = '#' + r + r + g + g + b + b;
}

function setColor(color) {
var link = getObj(curId);
var field = getObj(curId + 'field');
var picker = getObj('colorpicker');
field.value = color;
if (color == '') {
link.style.background = nocolor;
link.style.color = nocolor;
color = nocolor;
} else {
link.style.background = color;
link.style.color = color;
}
picker.style.display = 'none';
eval(getObj(curId + 'field').title);
}

function setDiv() {
if (!document.createElement) { return; }
var elemDiv = document.createElement('div');
if (typeof(elemDiv.innerHTML) != 'string') { return; }
genColors();
elemDiv.id = 'colorpicker';
elemDiv.style.position = 'absolute';
elemDiv.style.display = 'none';
elemDiv.style.border = '#000000 1px solid';
elemDiv.style.background = '#FFFFFF';
elemDiv.innerHTML = '<span style="font-family:Verdana; font-size:11px;">Pick a color: '
+ '(<a href="javascript:setColor(\'\');">No color</a>)<br>'
+ getColorTable()
+ '<center><a href="http://www.flooble.com/scripts/colorpicker.php"';

document.body.appendChild(elemDiv);
divSet = true;
}

function pickColor(id) {
if (!divSet) { setDiv(); }
var picker = getObj('colorpicker');
if (id == curId && picker.style.display == 'block') {
picker.style.display = 'none';
return;
}
curId = id;
var thelink = getObj(id);
picker.style.top = getAbsoluteOffsetTop(thelink) + 20;
picker.style.left = getAbsoluteOffsetLeft(thelink);
picker.style.display = 'block';
}

function genColors() {
addColorValue('0','0','0');
addColorValue('3','3','3');
addColorValue('6','6','6');
addColorValue('8','8','8');
addColorValue('9','9','9');
addColorValue('A','A','A');
addColorValue('C','C','C');
addColorValue('E','E','E');
addColorValue('F','F','F');

for (a = 1; a < colorLevels.length; a++)
addColor(0,0,a);
for (a = 1; a < colorLevels.length - 1; a++)
addColor(a,a,5);

for (a = 1; a < colorLevels.length; a++)
addColor(0,a,0);
for (a = 1; a < colorLevels.length - 1; a++)
addColor(a,5,a);

for (a = 1; a < colorLevels.length; a++)
addColor(a,0,0);
for (a = 1; a < colorLevels.length - 1; a++)
addColor(5,a,a);


for (a = 1; a < colorLevels.length; a++)
addColor(a,a,0);
for (a = 1; a < colorLevels.length - 1; a++)
addColor(5,5,a);

for (a = 1; a < colorLevels.length; a++)
addColor(0,a,a);
for (a = 1; a < colorLevels.length - 1; a++)
addColor(a,5,5);

for (a = 1; a < colorLevels.length; a++)
addColor(a,0,a);
for (a = 1; a < colorLevels.length - 1; a++)
addColor(5,a,5);

return colorArray;
}
function getColorTable() {
var colors = colorArray;
var tableCode = '';
tableCode += '<table border="0" cellspacing="1" cellpadding="1">';
for (i = 0; i < colors.length; i++) {
if (i % perline == 0) { tableCode += '<tr>'; }
tableCode += '<td bgcolor="#000000"><a style="outline: 1px solid #000000; color: '
+ colors[i] + '; background: ' + colors[i] + ';font-size: 10px;" title="'
+ colors[i] + '" href="javascript:setColor(\'' + colors[i] + '\');">&nbsp;&nbsp;&nbsp;</a></td>';
if (i % perline == perline - 1) { tableCode += '</tr>'; }
}
if (i % perline != 0) { tableCode += '</tr>'; }
tableCode += '</table>';
return tableCode;
}
function relateColor(id, color) {
var link = getObj(id);
if (color == '') {
link.style.background = nocolor;
link.style.color = nocolor;
color = nocolor;
} else {
link.style.background = color;
link.style.color = color;
}
eval(getObj(id + 'field').title);
}
function getAbsoluteOffsetTop(obj) {
var top = obj.offsetTop;
var parent = obj.offsetParent;
while (parent != document.body) {
top += parent.offsetTop;
parent = parent.offsetParent;
}
return top;
}

function getAbsoluteOffsetLeft(obj) {
var left = obj.offsetLeft;
var parent = obj.offsetParent;
while (parent != document.body) {
left += parent.offsetLeft;
parent = parent.offsetParent;
}
return left;
}
</script>
</head>

<body background="images/bgpic.gif">
<table width="100%" border="0">
<tr>
<td align="right">&nbsp;<br><br><br></td>
</tr>
</table>
<table width="100%" border="0">
<tr>
<td width="20%"><img src="images/home_logo.gif" width="72" height="100"></td>
<td align="center"><img src="images/about.gif" width="98" height="100"><img src="images/com.gif" width="98" height="100"><img src="images/events.gif" width="98" height="100"><img src="images/events%20(4).gif" width="98" height="100"><img src="images/med.gif" width="98" height="100"><img src="images/pub.gif" width="98" height="100"></td>
</tr>
<tr><td>&nbsp;</td></tr>
</table>
<form method="post" action="eventConfirm.asp" name="evUpload">
<table width="83%" border="0" align="right" class="forumline" cellspacing="1" cellpadding="4">
<tr>
<td height="28" colspan="2" align="center" class="rowbg">Events Upload</td>
</tr>
<tr>
<td width="30%" height="22" class="row1">Event Title :</td>
<td width="60%" class="row2">
<input type="text" name="txtEvName" size="80">
<font color="#FF0000"><b>**</b></font> </td>
</tr>
<tr>
<td width="30%" class="row1">Event Venue :</td>
<td width="60%" class="row2"><input type="text" name="txtEvLocation" size="80">
<font color="#FF0000"><strong>**</strong></font></td>
</tr>
<tr>
<td width="30%" class="row1">Event Speaker :</td>
<td width="60%" class="row2"><input type="text" name="txtEvHandler" size="40">
<font color="#FF0000"><strong>**</strong></font></td>
</tr>
<tr>
<td width="30%" class="row1">Event Date : </td>
<td width="60%" class="row2">
<input type="text" name="txtEvDate" size="40">
<strong><font color="#FF0000">**</font></strong></td>
</tr>
<tr>
<td width="30%" class="row1">Event Sysnopsis :</td>
<td width="60%" class="row2"><textarea name="txtaSysnopsis" cols="78" rows="4"></textarea></td>
</tr>
<tr>
<td width="30%" class="row1">Event SignUp : </td>
<td width="60%" class=row2 align=left><input type="text" name="txtSign" size="80"></td>
</tr>
<tr>
<td width="30%" class="row1">Event Weblink : </td>
<td width="60%" class=row2 align=left><input type="text" name="txtWeblink" size="80"></td>
</tr>
<!--<tr>
<td width="30%" class="row1">Event Image : </td>
<td width="60%" class=row2 align=left><input name="urlFile" type="file" size="50"> </td>
</tr>-->
<tr>
<td width="30%" class="row1">Event Content Color : </td>
<td width="60%" class="row2" align="left"><input id="pick1123677243field" size="9" onChange="relateColor('pick1123677243', this.value);" title="color" name="txtCol">
<a href="javascript:pickColor('pick1123677243');" id="pick1123677243"
style="border: 1px solid #000000; font-family:Verdana; font-size:10px;
text-decoration: none;">&nbsp;&nbsp;&nbsp;</a>
<script language="javascript">relateColor('pick1123677243', getObj('pick1123677243field').value);</script>
</td>
</tr>
<!--<tr><td colspan="2">&nbsp;</td></tr> -->
<tr><td colspan="2" align="center" class="row4">
<input type="submit" name="btnSend" value="Send">&nbsp;
<input type="reset" name="btnReset" value="Reset"> </td>
</tr>
</table>
</form>
</body>
</html>

neocool00
08-16-2005, 08:19 PM
When you get to the second page, are there values for the hidden fields? I suspect that you are loosing the values somewhere during the process.

mivec
08-16-2005, 08:31 PM
When you get to the second page, are there values for the hidden fields? I suspect that you are loosing the values somewhere during the process.

errrr....ok....so....where is it losing? i really hv stared at this few pages and i can't seem to find the prob for the past 2-3days!...help!...anyone....

miranda
08-17-2005, 02:03 AM
when you use this in the form tag enctype="multipart/form-data" you remove the use of the request object. remove that from the form in eventDone.asp.
To handle uploads of a file you need the enctype attribute in the form tag in which case you then have to use a collection from the upload class in lieu of the request object. If there is no file being uploaded don't use the enctype attribute.

mivec
08-17-2005, 08:40 AM
when you use this in the form tag enctype="multipart/form-data" you remove the use of the request object. remove that from the form in eventDone.asp.
To handle uploads of a file you need the enctype attribute in the form tag in which case you then have to use a collection from the upload class in lieu of the request object. If there is no file being uploaded don't use the enctype attribute.

thanks miranda!......and neocool.....it worked!!!..thanks again....

negbobby
01-14-2009, 07:43 PM
Error Type:
ADODB.Recordset (0x800A0CB3)
Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.
/Black/registersubmit.asp, line 23


<%@Language="VBScript" %>
<%Option Explicit%>
<!-- #include file="aspincludes/database.asp" -->
<%
Dim unval, pwval, fnval, lnval
Dim dbc, rs
Dim unok

unval = Request.Form("un")
pwval = Request.Form("pw")
fnval = Request.Form("fn")
lnval = Request.Form("ln")

Set dbc = ConnectToDB()
Set rs = RunQuery("SELECT * FROM Users WHERE username='" & unval & "';", dbc)
unok = rs.EOF
rs.Close

If unok = False Then
Response.Redirect("loginfailed.asp")
Else
Set rs = RunQuery("SELECT * FROM Users;", dbc)
rs.AddNew------Line23
rs("username") = unval
rs("password") = pwval
rs("firstname") = fnval
rs("lastname") = lnval
rs.Update
rs.Close

Response.Redirect("loginsuccessful.asp")
End If
%>

I can't seem to solve the problem here. Can anyone help me. up top is the coding. also here on the bottom is my asp includes file codes.


<%

Function ConnectToDB()

Dim dbconnection

Set dbconnection = Server.CreateObject("ADODB.Connection")
dbconnection.ConnectionString = "provider=Microsoft.ACE.OLEDB.12.0; data source=" & Server.MapPath("database/blackcatalog.accdb")
dbconnection.Open

Set ConnectToDB = dbconnection

End Function


Function RunQuery(sqlstatement, dbconnection)

Dim recset

Set recset = Server.CreateObject("ADODB.RecordSet")
recset.LockType = 2
recset.Open sqlstatement, dbconnection

Set RunQuery = recset

End Function

%>

CAn anyone help me solve this problem, please? It won't let me update my database. I've been working on this for three days and still dumb founded. I'm still a rookie with this. Please help!!

Spudhead
01-15-2009, 10:03 AM
Hi negbobby, welcome to the forum. Couple of bits of advice:

1. Don't tack your issue onto the end of another thread. People won't see it and it makes it hard to keep track of what's going on.

2. Read - and try out - all the suggestions posted so far and tell us what the outcome was for each.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum