Jeg er ved at konverter mine asp til asp.net. I asp bruger jeg følgende til
lave en connection:
[Sider som bruger connection]
<%@ Language=VBScript %>
<!-- #include file="Includes/Functions.asp" -->
<%
Set OBJdbConnection = Server.CreateObject("ADODB.Connection")
OBJdbConnection.Open ConnectionString
%>
[Functions.asp]
<%
server_name = *
db_path = *
db = *
DATABASE = *
MyArray = Split(db_path, "\\")
if (server_name = "*") then
DATABASE = MyArray(0) & "\\" & MyArray(1) & "\\database\\" & db
else
DATABASE = MyArray(0) & "\\" & MyArray(1) & "\\" & MyArray(2) & "\\database\\"
& db
end if
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Password="""";" &_
"User ID=Admin;Data Source=" & DATABASE & ";Mode=Share Deny None;" &_
"Extended Properties="""";Persist Security Info=True;" &_
"Jet OLEDB
ystem database="""";Jet OLEDB:Registry Path="""";" &_
"Jet OLEDB
atabase Password="""";Jet OLEDB:Engine Type=5;" &_
"Jet OLEDB
atabase Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;" &_
"Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database
Password="""";" &_
"Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;"
&_
"Jet OLEDB
on't Copy Locale on Compact=False;" &_
"Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB
FP=False;"
%>
Hvordan laver man i asp.net???