PC Review


Reply
Thread Tools Rate Thread

compiling error with asp.net 3.5 and not with 2.0

 
 
David
Guest
Posts: n/a
 
      17th Dec 2007
Hi,


Thsi code below works perfect under asp.net 2.0. Now, i installed asp.net
3.5 and i get an weird error. Even when i change the build version back to
2.0, the error remains. When i test this code with Cassini in VWD 2008, i
don't get that error.

I use a public shared sub into a class for performing an insert into a table
of the database.
I get following error:
BC30451: Name 'consql' is not declared
at line: consql.insert_rec(ddl1)

Thanks for help
David

class:
-----
Public Class consql
Public Shared Sub insert_rec(ByVal ddl1 As String)
Try
Using mConnection As New SqlConnection(param.ConnectionString)
Dim mCommand As SqlCommand = New SqlCommand("sauverec",
mConnection)
mCommand.CommandType = CommandType.StoredProcedure
mCommand.Parameters.AddWithValue("@ddl1", ddl1)
mConnection.Open()
mCommand.ExecuteNonQuery()
mConnection.Close()
mCommand.Dispose()
End Using
Catch ex As Exception
Throw
End Try
End Sub
End Class

code-behind:
------------
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim ddl1 As String
ddl1="ok"
consql.insert_rec(ddl1)
End Sub




 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CodeBehind not working or not compiling in VS2008 asp.net w/infragistics mike11d11 Microsoft ASP .NET 0 30th Jul 2010 03:47 PM
error C2144 and C4430 when compiling anything in VC++ 2005 =?Utf-8?B?TWljaGVs?= Microsoft VC .NET 1 15th Mar 2006 08:45 PM
Stop compiling doesn't stop compiling Rudy Ray Moore Microsoft VC .NET 0 5th May 2004 12:50 AM
Compiling Setup project returns: Could not find file '...' 'Interface not registered' =?Utf-8?B?TSBL?= Microsoft Dot NET Framework Forms 1 15th Apr 2004 08:27 AM
'Could not instantiate the resource processor' error compiling all code Matt Microsoft Dot NET 0 26th Sep 2003 12:41 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:28 PM.