Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 4th, 2004, 05:00 AM
Authorized User
 
Join Date: Aug 2004
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default Using MSDE SQL Version of WroxUnited

I am trying to work the WroxUnited lessons in CH13, only I am using the MSDE version on WroxUnited (Because SQL is what I use as a database). It has worked fine upto press using this syntax to make a connection from within the aspx pages

Dim connectionString As String = "server='(local)\WroxUnited'; trusted_connection=true; database='WroxUnited'"
Dim dbConnection As System.Data.IDbConnection = New System.Data.SqlClient.SqlConnection(connectionStri ng)

However, when this (as part of the data connection functions) are moved to the DataAccessCode.vb class and then compiled to the DataAccesssCode.dll, the following error occurs when starting the webpage default.aspx

Can anyone help me get this right.

Andrew

~~~~~~~~~~~~~~~~~~~~~~
Invalid PInvoke metadata format.
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.TypeLoadException: Invalid PInvoke metadata format.

Source Error:


Line 44: 'active dates will still be highlighted.
Line 45: dim DateReader as System.Data.iDataReader
Line 46: DateReader = SQLData.Dates()
Line 47:
Line 48: While DateReader.Read()


Source File: C:\BegASPNet11\WroxUnited\Default.aspx.vb Line: 46

Stack Trace:


[TypeLoadException: Invalid PInvoke metadata format.]
   System.Data.SqlClient.ConnectionPool.GetConnection (Boolean& isInTransaction) +484
   System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlConnectionString options, Boolean& isInTransaction) +311
   System.Data.SqlClient.SqlConnection.Open() +383
   WroxUnited.DataAccessCode.Dates() +108
   Wrox.DefaultCodeBehind.Page_Load() in C:\BegASPNet11\WroxUnited\Default.aspx.vb:46
   System.Web.Util.ArglessEventHandlerDelegateProxy.C allback(Object sender, EventArgs e) +10
   System.Web.UI.Control.OnLoad(EventArgs e) +55
   System.Web.UI.Control.LoadRecursive() +21
   System.Web.UI.Page.ProcessRequestMain() +724




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.0.3705.288; ASP.NET Version:1.0.3705.288

 
Old August 9th, 2004, 04:01 AM
Authorized User
 
Join Date: Aug 2004
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have solved my problem using the Microsoft Community for webmatrix
thanks






Similar Threads
Thread Thread Starter Forum Replies Last Post
Connecting WroxUnited DB's in SQL Server 2000 TritonOps ASP.NET 2.0 Basics 8 September 7th, 2006 11:29 PM
Export SQL db to MSDE planeswalk SQL Server 2000 1 October 8th, 2004 03:44 PM
SQL Server & MSDE reyboy SQL Server 2000 0 September 6th, 2004 10:15 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.