View previous topic :: View next topic |
Author |
Message |
erez -
Joined: 29 Nov 2003 Posts: 9
|
Posted: Tue Dec 09, 2003 3:50 am Post subject: DSN connection |
|
|
i'v created a DSN connection on my computer and a i wrote a little sql code
like that:
<%@ language="VBSCRIPT" codepage=1255%>
<%
set dataDB = Server.CreateObject("ADODB.Connection")
dataDB.Open
sql = "insert into table (test) values ('erez')"
dataDB.Execute(sql)
dataDB.Close
set dataDB = Nothing
%>
but i get an error that it can't connect to the database, this is the error:
Microsoft OLE DB Provider for ODBC Drivers- Error '80004005 : 80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
anyone know what is the problem? |
|
Back to top |
|
|
Thanos -
Joined: 22 Oct 2003 Posts: 14
|
Posted: Tue Dec 09, 2003 3:20 pm Post subject: |
|
|
Hi!
I do the same things with this code :
Quote: | <%
DSN_BASE = "DBQ=" & Server.Mappath("divx.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};Driverld=25"
Set Conn=Server.CreateObject("ADODB.Connection")
Conn.Open DSN_BASE
Set rsTitre=Server.CreateObject("ADODB.Recordset")
rsTitre.Open "SELECT * FROM anime WHERE auto=3,Conn,3
%> |
I begin on ASP, but i think you miss the "DSN_BASE" value.
Try to add it |
|
Back to top |
|
|
erez -
Joined: 29 Nov 2003 Posts: 9
|
Posted: Tue Dec 09, 2003 3:28 pm Post subject: yes, that was the problem but now i have a new problem |
|
|
when i insert a value into the database i get a server error:
Error 500
Internal Server Error
--------------------------------------------------------------------------------
Abyss Web Server X1 Update 1
© Aprelium Technologies - 2001-2003
but when i open the database in access then i can see that it inserted the value, then why is the error?
another thing, when i try to read the value i get the same server error:
Error 500
Internal Server Error
--------------------------------------------------------------------------------
Abyss Web Server X1 Update 1
© Aprelium Technologies - 2001-2003
what is the problem? |
|
Back to top |
|
|
Thanos -
Joined: 22 Oct 2003 Posts: 14
|
Posted: Tue Dec 09, 2003 3:34 pm Post subject: |
|
|
i've got the same error...
Is it a first install of aHTML ?
What is your version of VBscript (check the version of the file vbscript.dll) ?
You need at least VBScript 5.5 (you can download 5.6 from microsoft.com) |
|
Back to top |
|
|
erez -
Joined: 29 Nov 2003 Posts: 9
|
Posted: Tue Dec 09, 2003 3:46 pm Post subject: |
|
|
i'v checked the version of the file vbscript.dll and it's: 5.6.0.7426
so i think that the version is good.
this is the first time i installed the aHTML, i got the latest version from their website. |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Tue Dec 09, 2003 4:08 pm Post subject: |
|
|
erez,
Error 500 means that ActiveHTML was unable to run due to some DLL error (usually). Try running that script from the command line to see that error:
* Open the command line (DOS box) in Windows (you can execute cmd to get it)
* type cd "C:\Program Files\ActiveHTML" (we assume the ActiveHTML is installed in C:\Program Files\ActiveHTML)
* execute: ahtml.exe "path\to\your\script.asp"
What is the error message you get? _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
Thanos -
Joined: 22 Oct 2003 Posts: 14
|
Posted: Tue Dec 09, 2003 4:09 pm Post subject: |
|
|
yep, the version seems to be good.
bad news : the last version of aHTML is not free anymore. Look at others topics here.
for your problem, have you try with just a simple ASP code ?
like <%=now%>
is it working ? |
|
Back to top |
|
|
erez -
Joined: 29 Nov 2003 Posts: 9
|
Posted: Tue Dec 09, 2003 4:16 pm Post subject: simple asp code is working great |
|
|
and about the latest version of aHTML, i also have an older version from this forum.
do you an idea why i get the error when i'm working with the database? |
|
Back to top |
|
|
Thanos -
Joined: 22 Oct 2003 Posts: 14
|
Posted: Tue Dec 09, 2003 4:27 pm Post subject: |
|
|
nope... sorry.
have you try with my synthaxe ? |
|
Back to top |
|
|
erez -
Joined: 29 Nov 2003 Posts: 9
|
Posted: Tue Dec 09, 2003 4:40 pm Post subject: i don't believe, your syntext is working great.... :-) |
|
|
can you help me find what is wrong with my code?
sql = "insert into f_album (test) values ('erez')"
dataDB.Execute(sql)
dataDB.Close
set dataDB = Nothing
i have to use recordset? |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Tue Dec 09, 2003 11:01 pm Post subject: Re: i don't believe, your syntext is working great.... :-) |
|
|
erez;
Error 500 isn't a syntax error. If it were a syntax error, ActiveHTML would have reported it cleanly.
Error 500 means that ActiveHTML had a "big" problem when running. This kind of problems is usually related to missing DLLs (or bad version) or missing COM objects. Have you tried running Ahtml from the command line as we suggested? _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
aven -
Joined: 26 Dec 2003 Posts: 12 Location: Huddinge, Stockholm, Sweden
|
Posted: Fri Dec 26, 2003 9:57 pm Post subject: |
|
|
.....
Last edited by aven on Mon Dec 29, 2003 6:30 pm; edited 1 time in total |
|
Back to top |
|
|
Ilix -
Joined: 27 Dec 2003 Posts: 3
|
Posted: Sun Dec 28, 2003 12:00 am Post subject: Re: DSN connection |
|
|
erez wrote: | i'v created a DSN connection on my computer and a i wrote a little sql code
like that:
<%@ language="VBSCRIPT" codepage=1255%>
<%
set dataDB = Server.CreateObject("ADODB.Connection")
dataDB.Open
sql = "insert into table (test) values ('erez')"
dataDB.Execute(sql)
dataDB.Close
set dataDB = Nothing
%>
but i get an error that it can't connect to the database, this is the error:
Microsoft OLE DB Provider for ODBC Drivers- Error '80004005 : 80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
anyone know what is the problem? |
It seems like you did not specify a path to the actual database file.
After I started using Abyss and Ahtml I kept on using the same database connection that I usually use (I copy it from project to project), and it worked perfectly:
---
dbase_path = Server.MapPath("dbase.mdb")
db_conn = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE="& dbase_path & ";"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open db_koppling
SQL = "Select * From table order by port asc;"
Set RS = Conn.Execute(SQL)
---
/Ilix |
|
Back to top |
|
|
|