Hi,
I've just read the article about Data Access (http://www.asp.net/learn/dataaccess/default.aspx?tabid=63). Now I'm trying to create a DAL my self. But I get lots of errors (18 of them).
Error examples:
--------------------------------
Error 1 'string' does not contain a definition for 'Convert' c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\folder\462f30a9\7f7f39b4\App_Code.mxcujrb-.2.cs 8362
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public void SetIPNull() {
this[this.tableVisitors.IPColumn] = System.Convert.DBNull; <-- Line 8362
}
--------------------------------
Error 5 'string' does not contain a definition for 'DBNull' c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\folder\462f30a9\7f7f39b4\App_Code.mxcujrb-.2.cs 13882
if ((IP == null)) {
this.Adapter.InsertCommand.Parameters[1].Value = System.DBNull.Value; <-- Line 13882
}
else {
this.Adapter.InsertCommand.Parameters[1].Value = ((string)(IP));
}
--------------------------------
Error 9 'string' does not contain a definition for 'Data' c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\folder\462f30a9\7f7f39b4\App_Code.mxcujrb-.2.cs 13907
this.Adapter.InsertCommand.Parameters[5].Value = ((System.DateTime)(CreatedDate));
System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
if (((this.Adapter.InsertCommand.Connection.State & System.Data.ConnectionState.Open) != System.Data.ConnectionState.Open)) { <-- Line 13907
this.Adapter.InsertCommand.Connection.Open();
}
--------------------------------
Thanks!
// Martin