|
Hai,...
I have designed a coding to accept the information from the user(i.e., user Name, staffno and comments) and to store the same input into Access database.But when I clickon sumbit button I am getting the following error:
Error type :
Microsoft Jet Database Engine (0*80040E14)
Number of querty values and the desatination feilds are not the same
/report/formreport.asp,Line 29
---------------------------------------------------------------------------------------------------------------------------------------------------------
The coding is shown below
<html>
<% @LANGUAGE="VBScript" %>
<body>
<%
' Declaring variables
Dim username, userstaffno, usercomments, data_source, con, sql_insert
' A Function to check if some field entered by user is empty
Function ChkString(string)
If string = "" Then string = " "
ChkString = Replace(string, "'", "''")
End Function
' Receiving values from Form
username = ChkString(Request.Form("username"))
userstaffno = ChkString(Request.Form("userstaffno"))
usercomments = ChkString(Request.Form("usercomments"))
data_source = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" &_
Server.MapPath("formreport.mdb")
sql_insert = "insert into formreport (username,userstaffno,usercomments)"
sql_insert = sql_insert & " values (' " & Request.Form("username") & " ' , ' " & Request.Form("userstaffno") & " ' , ' " & Request.Form("usercomments") & " ' , ' " & " ' )"
' Creating Connection Object and opening the database
Set con = Server.CreateObject("ADODB.Connection")
con.Open data_source
con.Execute sql_insert
' Done. Close the connection
con.Close
Set con = Nothing
Set sql_insert = Nothing
Response.Write "All records were successfully entered into the database."
%>
</body>
</html>
Please help me
Thanks in advance
|
|
|
|
|
how can i update a database with n no of entries and in a specific column?
eg.students attendance for a specific date is to be updated.
what should be the code? please tell me.
kashmira
|
|
|
|
|
Is it possible to bypass the CheckSecurity() function in the config.asp file? I'd prefer to not have my users need to log into my domain to access the database. When I delete the string default.asp doesn't work anymore..
Any ideas?
|
|
|
|
|
This application is excellent!
For some reason I can add rows to the table database and yet when I click the "edit," "copy," or "delete" buttons, it simply takes me back to the default.asp page. I have all write persmissions enabled on the folders... any ideas?
Thanks!
Spencer
-- modified at 1:28 Monday 25th September, 2006
Nevermind, I figured out that it had to do with the way my database was configured in Access.
Thanks though!
|
|
|
|
|
I uploaded project to the server, but when I try to open it in browser the messagebox appears to enter "Username" and "Password".
So, what is the username and password do I have to enter?
|
|
|
|
|
need asp notes for help please send at shahidonline@yahoo.com
|
|
|
|
|
When I try to edit the data in one particular table and save it I get an error:
ERRORS!
Multiple-step operation generated errors. Check each status value.
Can someone explain what this error means? Other tables work okay, and I can add a new record to this table.
Thanks
|
|
|
|
|
First off, this code is beautiful!!! However, I run the code on a SSL site, ie: https. When doing so, each page gives me the security warning. "This page contains both secure and nonsecure items. Do you want to display the nonsecure items?"
I have searched thru the web for hours trying to find a way to disable this message from popping up. Some sites say that the warning could be due to files being called from another nonsecure http site. But, the routine does not have any calls that do this. I have tried adjusting my security settings, even the exact setting that should remove the warning but it does nothing! The message comes up each and every page I go to, HELP!!!!
|
|
|
|
|
If a table is empty dbedit shows me 'no Data' and toolbar control doesn't appear.
I can not add records.
|
|
|
|
|
good work bjornar! i've learned a lot from your code. btw, it's working when tested locally. what should we change in there so it could be used for remote administration on any computer? It brings out different error(ei unspecified) when accessed on another computer.
can we all try to solve this one? thanks!;)
|
|
|
|
|
Ms access 2000 database can function very well with all the primary,foreign, it can work accordingly how is supposed to be, if i use the sql server 7.0 database, primary, foreign key lookup not functioning...eventhough i use the proper northwind sql server sample database for the testing cant able to work with search or lookup or listview, your asp coding is very usefull around south pacific countries, some of my co progrmers friends also aware about this coding, nice job...please help me, this can be very usefull for the beginging stage programmers....
|
|
|
|
|
Response object error 'ASP 0156 : 80004005'
Header Error
/common.asp, line 38
The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page content.
it can run under window 2000, cant able to run windows98, please give me suggestion, how can i use the source code under windows98...help me.
|
|
|
|
|
i am using windows98,microsoft SQL Server 7.0
Object.Conn = Server.CreateObject("ADODB.Connection");
Object.Conn.Open(Config("connstr"));
Object.Conn.CursorLocation = adUseClient;
PageSetup(); -> remove this function and place the above three line here
NewPageHeader();
Content(Object.Conn);
NewPageFooter();
PageCleanup();
stupit process like this no body wants to c ur page...
|
|
|
|
|
Hi, I have a problem using the Online DB Administration tool.
I can connect to the database fine and can view its tables.
When I select a table I can view the records fine, but I when I click on edit a record it simply goes back to the default page.
I get the following errors on the bottom of the page:
Line 14; Char 66
Error: Expected ';'
Code: 0
Line 14; Char 101
Error: Expected ';'
Code: 0
Line 14; Char 102
Error: Expected ';'
Code: 0
Can anyone help?
Thanks
Simon
|
|
|
|
|
When I set config.asp into oracle, then I execute default.asp
but the table didn't list
and when I execute data.asp?table=mytable, then the value of the table is shown but I cant edit, delete or addnew
can you help me please
ahmadi al fauzy
|
|
|
|
|
as suggested, i edited the config pages to point to my data base, and on viewing, gets the following message.
Response object error 'ASP 0156 : 80004005'
Header Error
/netdb/common.asp, line 37
The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page content.
any body knows how to solve the problem??
any help will be highly appreciated.
( i saw another user had the same problem, but no replies to it....)
thnx.
vjkumar
|
|
|
|
|
Hi,
when try to use your script is possible to change index, add and drop table, modify their structure, but the key for add a new row in table is disabled like there is not the column at the left with the icons for edit delete and copy a record.
In few word the only thing impossible is edit the rows of a table.
Why? (is a config problem?)
Thank's
MaPi
|
|
|
|
|
I have no problem to apply your BGrid in ASP using Javascript. A great package.
However, I couldn't figure out how to use the BGrid class using VBScript. I try the following codes without success. I keep getting this error: "Microsoft VBScript runtime (0x800A01FA) Class not defined: 'BGrid'"
What is the correct syntax I should use? Thanks a lot.
set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open("DSN=TEST; UID=TEST; PWD=TEST")
Conn.CursorLocation = adUseClient
set rs = Server.CreateObject("ADODB.Recordset")
str1 = "SELECT * FROM EMPLOYEE"
rs.Open str1, Conn, adOpenStatic, adLockOptimistic, adCmdText
set Grid = new BGrid
Grid rs
Grid.Process
Grid.Display
|
|
|
|
|
Just figure out how it works with VBScript.
set Grid = CreateGrid(rs)
Grid.Process
Grid.Display
|
|
|
|
|
How do you "Online Administer DB" as you pretend in ASP.NET (aspx), with this code please ?
As your article is introduced under ASP.NET hierarchy, make an effort and translate it under aspx.
You'll see then that when u use vbscript mixed to javascript to format time, that introduces a 2nd script language and makes impossible to compile your code in ASP.NET !
Think it's a piece of museum, an obsolete piece of ASP pages..
Sorry
|
|
|
|
|
Since this code is written for ASP, I don't pretend it does anything under ASP.NET. Wether you run the rest of your web site under ASP.NET is up to you. ASP and ASP.NET runs fine together you know (or at least you should know ).
All ASP articles here at CodeProject is under the ASP.NET hierarchy. Does that mean you think all ASP articles here is useless and obsolete?
|
|
|
|
|
Great app. I guess it will only run on IIS as I could not get it working in PWS.
I noticed that it does not support binary field in the table or column create. I've not cracked open the code to see if I can do it myself but I thought this might be a simple mod for you.
Cheers and thanks for the great app.
bill
|
|
|
|
|
What database are you running against? I have no problems creating tables with either bit or binary (not sure which type you meant) fields on a MS-SQL database. I didn't test right now on Access, but it should support any datatype the db supports. I check available datatypes through the ProviderType schema.
|
|
|
|
|
Disregard. I was not seeing the 'bit' type in the column create dropdown list. I was looking for 'boolian'
bill
|
|
|
|
|
Hi !
I'm getting an 'access denied' error when trying to access a Microsoft Access database on my hosted website. I uploaded all the files and updated the config.asp file.
Anyone any suggestions ?
Thx,
Tom
|
|
|
|