hi.
i'm getting an error when connecting to sql server db but not when connecting to access db.
here's my code:
the error occurs on line 13:
line 13: dbconn.open()
ther error is: Public member 'Open' on type 'String' not found
any ideas?
thanks.
i'm getting an error when connecting to sql server db but not when connecting to access db.
here's my code:
Code:
<%@ Import Namespace="System.Data.OleDb" %>
<script runat="server">
sub Page_Load
Dim dbconn, sql, dbcomm, dbread
dbconn = "Provider=SQLNCLI10;Server=A20ootb05l01457;Database=master;Trusted_Connection=yes;"
dbconn.Open()
sql = "SELECT * FROM persons"
dbcomm = New OleDbCommand(sql, dbconn)
dbread = dbcomm.ExecuteReader()
rep_info.DataSource = dbread
rep_info.DataBind()
dbread.Close()
dbconn.Close()
End Sub
</script>
line 13: dbconn.open()
ther error is: Public member 'Open' on type 'String' not found
any ideas?
thanks.