Hi,
I'm doing a web based tracking system for exam questions. Using ASP
with VBScript to link the database. I have the main log in screen
working but when i enter the log in details i get this error:
- Error Type
Provider (0x80004005)
Unspecified error
/ets/functions.asp, line 20
my functions.asp file looks like below. I am a total beginner with ASP
and VBScript by the way, any help would be awesome. cheers
<!-- #INCLUDE FILE="adovbs.inc" -->
<%
'---------------------------------------------------------------------------
' Global Variables
'---------------------------------------------------------------------------
Dim cnnProject, cnnProjectUpdate
'---------------------------------------------------------------------------
' Open Database
'---------------------------------------------------------------------------
Function OpenDatabase()
Set cnnProject = Server.CreateObject("ADODB.Connection")
cnnProject.ConnectionTimeout = 5
cnnProject.CommandTimeout = 30
cnnProject.Open DB_PROJECTS_CONN_STRING
'Server.CreateObject("ADODB.Connection").Open
"DBQ="&Server.MapPath("database/ets.mdb")&"; Driver={Microsoft Access
Driver (*.mdb)};"
End Function
'---------------------------------------------------------------------------
' Close Database
'---------------------------------------------------------------------------
Function CloseDatabase()
cnnProject.Close
Set cnnProject = Nothing
End Function
'---------------------------------------------------------------------------
' Get User ID
'---------------------------------------------------------------------------
Function GetUserID()
GetUserID = Session("UserID")
End function
'---------------------------------------------------------------------------
' Get User Password
'---------------------------------------------------------------------------
Function GetUserPassword(strUserID)
Dim cnnLogin, rsUsers
Dim strPassword
strPassword = ""
' Create RS and query DB for quiz info
Set rsUsers = Server.CreateObject("ADODB.Recordset")
rsUsers.Open "SELECT * FROM Login WHERE TeamId="&strUserID&";",
cnnProject
If Not rsUsers.EOF Then
strPassword = rsUsers("Password")
End if
rsUsers.Close
Set rsUsers = Nothing
GetUserPassword = strPassword
End function
'---------------------------------------------------------------------------
' Get User Password
'---------------------------------------------------------------------------
Function GetUserEmailAddress(strUserID)
Dim cnnLogin, rsUsers
Dim strEmailAddress
strEmailAddress = ""
' Create RS and query DB for quiz info
Set rsUsers = Server.CreateObject("ADODB.Recordset")
rsUsers.Open "SELECT * FROM Login WHERE TeamId="&strUserID&";",
cnnProject
If Not rsUsers.EOF Then
strEmailAddress = rsUsers("Email_Address")
End if
rsUsers.Close
Set rsUsers = Nothing
GetUserEmailAddress = strEmailAddress
End function
'---------------------------------------------------------------------------
' If the user is admin - logout
'---------------------------------------------------------------------------
Function isAdmin(login)
Dim rsUsers
' Create RS and query DB for quiz info
Set rsUsers = Server.CreateObject("ADODB.Recordset")
rsUsers.Open "SELECT * FROM Login WHERE TeamId="&login&";",
cnnProject
If rsUsers("LogType")="Admin" Then
Response.Redirect("Logout.asp")
End if
rsUsers.Close
Set rsUsers = Nothing
End function
%> 2 1989
Hi Geoff,
From the error code that you are getting, I would suggest that you check
that your hosting company permits you to use MSAccess databases - they may
have prevented "access" (excuse the pun).
Rgds,
Eric
"ge*********@gmail.com" wrote:
Hi,
I'm doing a web based tracking system for exam questions. Using ASP
with VBScript to link the database. I have the main log in screen
working but when i enter the log in details i get this error:
- Error Type
Provider (0x80004005)
Unspecified error
/ets/functions.asp, line 20
my functions.asp file looks like below. I am a total beginner with ASP
and VBScript by the way, any help would be awesome. cheers
<!-- #INCLUDE FILE="adovbs.inc" -->
<%
'---------------------------------------------------------------------------
' Global Variables
'---------------------------------------------------------------------------
Dim cnnProject, cnnProjectUpdate
'---------------------------------------------------------------------------
' Open Database
'---------------------------------------------------------------------------
Function OpenDatabase()
Set cnnProject = Server.CreateObject("ADODB.Connection")
cnnProject.ConnectionTimeout = 5
cnnProject.CommandTimeout = 30
cnnProject.Open DB_PROJECTS_CONN_STRING
'Server.CreateObject("ADODB.Connection").Open
"DBQ="&Server.MapPath("database/ets.mdb")&"; Driver={Microsoft Access
Driver (*.mdb)};"
End Function
'---------------------------------------------------------------------------
' Close Database
'---------------------------------------------------------------------------
Function CloseDatabase()
cnnProject.Close
Set cnnProject = Nothing
End Function
'---------------------------------------------------------------------------
' Get User ID
'---------------------------------------------------------------------------
Function GetUserID()
GetUserID = Session("UserID")
End function
'---------------------------------------------------------------------------
' Get User Password
'---------------------------------------------------------------------------
Function GetUserPassword(strUserID)
Dim cnnLogin, rsUsers
Dim strPassword
strPassword = ""
' Create RS and query DB for quiz info
Set rsUsers = Server.CreateObject("ADODB.Recordset")
rsUsers.Open "SELECT * FROM Login WHERE TeamId="&strUserID&";",
cnnProject
If Not rsUsers.EOF Then
strPassword = rsUsers("Password")
End if
rsUsers.Close
Set rsUsers = Nothing
GetUserPassword = strPassword
End function
'---------------------------------------------------------------------------
' Get User Password
'---------------------------------------------------------------------------
Function GetUserEmailAddress(strUserID)
Dim cnnLogin, rsUsers
Dim strEmailAddress
strEmailAddress = ""
' Create RS and query DB for quiz info
Set rsUsers = Server.CreateObject("ADODB.Recordset")
rsUsers.Open "SELECT * FROM Login WHERE TeamId="&strUserID&";",
cnnProject
If Not rsUsers.EOF Then
strEmailAddress = rsUsers("Email_Address")
End if
rsUsers.Close
Set rsUsers = Nothing
GetUserEmailAddress = strEmailAddress
End function
'---------------------------------------------------------------------------
' If the user is admin - logout
'---------------------------------------------------------------------------
Function isAdmin(login)
Dim rsUsers
' Create RS and query DB for quiz info
Set rsUsers = Server.CreateObject("ADODB.Recordset")
rsUsers.Open "SELECT * FROM Login WHERE TeamId="&login&";",
cnnProject
If rsUsers("LogType")="Admin" Then
Response.Redirect("Logout.asp")
End if
rsUsers.Close
Set rsUsers = Nothing
End function
%>
On Apr 18, 10:38 am, Eric <E...@discussions.microsoft.comwrote:
Hi Geoff,
From the error code that you are getting, I would suggest that you check
that your hosting company permits you to use MSAccess databases - they may
have prevented "access" (excuse the pun).
Rgds,
Eric
"geoff.ag...@gmail.com" wrote:
Hi,
I'm doing a web based tracking system for exam questions. Using ASP
with VBScript to link the database. I have the main log in screen
working but when i enter the log in details i get this error:
- Error Type
Provider (0x80004005)
Unspecified error
/ets/functions.asp, line 20
my functions.asp file looks like below. I am a total beginner with ASP
and VBScript by the way, any help would be awesome. cheers
<!-- #INCLUDE FILE="adovbs.inc" -->
<%
'---------------------------------------------------------------------------
' Global Variables
'---------------------------------------------------------------------------
Dim cnnProject, cnnProjectUpdate
'---------------------------------------------------------------------------
' Open Database
'---------------------------------------------------------------------------
Function OpenDatabase()
Set cnnProject = Server.CreateObject("ADODB.Connection")
cnnProject.ConnectionTimeout = 5
cnnProject.CommandTimeout = 30
cnnProject.Open DB_PROJECTS_CONN_STRING
'Server.CreateObject("ADODB.Connection").Open
"DBQ="&Server.MapPath("database/ets.mdb")&"; Driver={Microsoft Access
Driver (*.mdb)};"
End Function
'---------------------------------------------------------------------------
' Close Database
'---------------------------------------------------------------------------
Function CloseDatabase()
cnnProject.Close
Set cnnProject = Nothing
End Function
'---------------------------------------------------------------------------
' Get User ID
'---------------------------------------------------------------------------
Function GetUserID()
GetUserID = Session("UserID")
End function
'---------------------------------------------------------------------------
' Get User Password
'---------------------------------------------------------------------------
Function GetUserPassword(strUserID)
Dim cnnLogin, rsUsers
Dim strPassword
strPassword = ""
' Create RS and query DB for quiz info
Set rsUsers = Server.CreateObject("ADODB.Recordset")
rsUsers.Open "SELECT * FROM Login WHERE TeamId="&strUserID&";",
cnnProject
If Not rsUsers.EOF Then
strPassword = rsUsers("Password")
End if
rsUsers.Close
Set rsUsers = Nothing
GetUserPassword = strPassword
End function
'---------------------------------------------------------------------------
' Get User Password
'---------------------------------------------------------------------------
Function GetUserEmailAddress(strUserID)
Dim cnnLogin, rsUsers
Dim strEmailAddress
strEmailAddress = ""
' Create RS and query DB for quiz info
Set rsUsers = Server.CreateObject("ADODB.Recordset")
rsUsers.Open "SELECT * FROM Login WHERE TeamId="&strUserID&";",
cnnProject
If Not rsUsers.EOF Then
strEmailAddress = rsUsers("Email_Address")
End if
rsUsers.Close
Set rsUsers = Nothing
GetUserEmailAddress = strEmailAddress
End function
'---------------------------------------------------------------------------
' If the user is admin - logout
'---------------------------------------------------------------------------
Function isAdmin(login)
Dim rsUsers
' Create RS and query DB for quiz info
Set rsUsers = Server.CreateObject("ADODB.Recordset")
rsUsers.Open "SELECT * FROM Login WHERE TeamId="&login&";",
cnnProject
If rsUsers("LogType")="Admin" Then
Response.Redirect("Logout.asp")
End if
rsUsers.Close
Set rsUsers = Nothing
End function
%>
hi,
managed to get it sorted in the end. something stupid on my part.
cheers for your help This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Lamberti Fabrizio |
last post by:
Hi all,
I've to access to a network file from an asp pages.
I've red a lot of things on old posts and on Microsoft article but I can't
still...
|
by: Z0gS |
last post by:
I got this problem for the web application
I try to access files on a remote server. string dirs = Directory.GetDirectories(@"E:\vehicles")
E...
|
by: CS Wong |
last post by:
Hi,
I have a page form where form elements are created dynamically using
Javascript instead of programatically at the code-behind level. I have...
|
by: Khalique |
last post by:
I have built a web service whose purpose is to copy files from a secure place
to client machine and vice versa. The problem I am having is perhaps...
|
by: Olivier BESSON |
last post by:
Hello,
I have a web service of my own on a server (vb.net). I must declare it with
SoapRpcMethod to be used with JAVA.
This is a simple exemple...
|
by: raj_genius |
last post by:
I hav two queries, whc are as follows:
FIRSTLY:
is it possible to access the controls(by name) of a parent form(MDI)
from its child forms??if yes...
|
by: kosmodisk |
last post by:
Hi,
I'm having problem accessing javascript-created elements from opened
window. This occurs only when I'm including another files in opened...
|
by: Nathan Sokalski |
last post by:
I have a validator that I wrote by inheriting from BaseValidator. At certain
points in the code, I need to access other controls on the page...
|
by: GaryDean |
last post by:
I have a Wizard page and need to affect the next and previous buttons from
my code-behind. I've googled around and found two solutions, and neither...
|
by: Jon |
last post by:
I wrote a VS 2005 C# express programme that accesses a web service. It works fine when there's a
direct connection to the internet, but on two...
|
by: concettolabs |
last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
|
by: better678 |
last post by:
Question:
Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct?
Answer:
Java is an object-oriented...
|
by: antdb |
last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine
In the overall architecture, a new "hyper-convergence" concept was...
|
by: Matthew3360 |
last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function.
Here is my code.
...
|
by: Matthew3360 |
last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
|
by: AndyPSV |
last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
|
by: Arjunsri |
last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
|
by: Matthew3360 |
last post by:
Hi,
I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
|
by: Oralloy |
last post by:
Hello Folks,
I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA.
My problem (spelled failure) is with the...
| |