Same error again.
Specified cast is not valid.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.InvalidC astException: Specified cast is not
valid.
Source Error:
Line 70: End With
Line 71: ' Execute the SQL
Line 72: Dim strSystemName As Integer =
CInt(cmd1.Execu teScalar)
Line 73: 'Dim dr As OleDbDataReader = cmd1.ExecuteRea der
Line 74: 'Dim temp As Object = cmd1.ExecuteSca lar
Source File: C:\Inetpub\wwwr oot\WebPDB2\Glo bal.asax.vb Line: 72
Stack Trace:
[InvalidCastExce ption: Specified cast is not valid.]
System.Data.Ole Db.OleDbExcepti on..ctor(IError Info errorInfo, Int32
errorCode, Exception inner)
System.Data.Ole Db.OleDbConnect ion.ProcessResu lts(Int32 hResult,
OleDbConnection connection, Object src)
System.Data.Ole Db.OleDbCommand .ExecuteCommand TextErrorHandli ng(Int32
hr)
System.Data.Ole Db.OleDbCommand .ExecuteCommand TextForSingleRe sult(tagDBPARAM S
dbParams, Object& executeResult)
System.Data.Ole Db.OleDbCommand .ExecuteCommand Text(Object&
executeResult)
System.Data.Ole Db.OleDbCommand .ExecuteCommand (CommandBehavio r
behavior, Object& executeResult)
System.Data.Ole Db.OleDbCommand .ExecuteReaderI nternal(Command Behavior
behavior, String method)
System.Data.Ole Db.OleDbCommand .ExecuteScalar( )
WebPDB2.Global. Session_Start(O bject sender, EventArgs e) in
C:\Inetpub\wwwr oot\WebPDB2\Glo bal.asax.vb:72
System.Web.Sess ionState.Sessio nStateModule.Ra iseOnStart(Even tArgs
e)
System.Web.Sess ionState.Sessio nStateModule.On Start(EventArgs e)
System.Web.Sess ionState.Sessio nStateModule.Co mpleteAcquireSt ate()
System.Web.Sess ionState.Sessio nStateModule.Be ginAcquireState (Object
source, EventArgs e, AsyncCallback cb, Object extraData)
System.Web.Asyn cEventExecution Step.System.Web .HttpApplicatio n+IExecutionSte p.Execute()
System.Web.Http Application.Exe cuteStep(IExecu tionStep step,
Boolean& completedSynchr onously) +173
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.432 2.573;
ASP.NET Version:1.1.432 2.573
On Tue, 8 Jun 2004 20:34:58 +0200, "Cor Ligthert"
<no**********@p lanet.nl> wrote:
Hi John,
Is the field description of both databases equal
You can of course just try this
Dim strSystemName As Integer = Cint(cmd1.Execu teScalar)
Just a thought,
Cor