![]() |
Show 150 posts per page |
.dsy:it. (http://www.dsy.it/forum/)
- Forum De Bell Tolls (http://www.dsy.it/forum/forumdisplay.php?forumid=7)
-- [INFORMATICA] Asp (http://www.dsy.it/forum/showthread.php?threadid=5192)
[INFORMATICA] Asp
Ho fatto queste due pagine asp ma come errore mi dice che non trova il database.....qualcuno mi sa spiegare dove si trova l'errore?
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Dim cnn
Dim str
Set cnn = CreateObject("ADODB.Connection")
str="Provider=MSDASQL.1;Data Source=AriMiddle;"
str=str & "User ID=;Password="
cnn.ConnectionString=str
cnn.Open
cnn.Close
Response.Write("Opened and closed<BR>")
str="Data Source=AriMiddle"
cnn.Open str
Response.Write("Opened and closed<BR>")
cnn.Close
</SCRIPT>
--------------------------------
<SCRIPT language=VBScript RUNAT=Server>
Function GetCoursesData(cnn)
Dim rs
Dim SQL
Dim str
SQL="SELECT Tabella1.CourseName From Tabella1"
Set rs=CreateObject("ADODB.Recordset")
rs.ActiveConnection=cnn
rs.Open SQL
While Not rs.EOF
str=str&rs("CourseName")&"<BR>"
rs.MoveNext
Wend
GetCoursesData=str
End Function
Dim cnn
Dim str
Set cnn = CreateObject("ADODB.Connection")
str="Data Source=AriMiddle"
cnn.Open str
Response.Write("Ciao")
Response.Write GetCoursesData(cnn)
cnn.Close
</SCRIPT>
come si chiama il database?
Non lo indichi ....o se è AriMiddle non indichi l'estensione!
__________________
BinarySun
"L'intelligenza è una pianta che va curata continuamente.
Dovreste vedere com'è bello, il mio bonsai."
Rat-man®
no ho trovato l'errore grazie comunque ciao
| All times are GMT. The time now is 11:52. | Show all 3 posts from this thread on one page |
Powered by: vBulletin Version 2.3.1
Copyright © Jelsoft Enterprises Limited 2000 - 2002.