Help,
I’m applying updates to a web application that used Web Form Designer
Generated Code. I’m using Visual Studio 2003. For some reason lines keep
dropping out of the code in the .aspx.vb code behind file. Here’s the 2
lines that keep dropping. I think since the 1st line drops where the m_oConn
is being assigned with the connection string it is being dropped everywhere
it is being used. This of course causes errors when the program tries to
call the stored procedure. The error is "connection propery object has not
been initialized". This happens on every form I go into and modify with
visual studio.
Below is a small sample of the code.
1. Me.m_oConn = New
System.Data.Sql Client.SqlConne ction(clsUtil.G etConnString)
2. Me.SqlDeleteCom mand1.Connectio n = Me.m_oConn
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnos tics.DebuggerSt epThrough()Priv ate Sub
InitializeCompo nent()
1st LINE IS ADDED HERE!!
Me.m_DADeals = New System.Data.Sql Client.SqlDataA dapter
Me.SqlDeleteCom mand1 = New System.Data.Sql Client.SqlComma nd
'
'SqlDeleteComma nd1
'
Me.SqlDeleteCom mand1.CommandTe xt = "[DEALS_DELETE]"
Me.SqlDeleteCom mand1.CommandTy pe =
System.Data.Com mandType.Stored Procedure
2ND LINE IS ADDED HERE!!!!
Me.SqlDeleteCom mand1.Parameter s.Add(New
System.Data.Sql Client.SqlParam eter("@RETURN_V ALUE",
System.Data.Sql DbType.Int, 4, System.Data.Par ameterDirection .ReturnValue,
False, CType(0, Byte), CType(0, Byte), "",
System.Data.Dat aRowVersion.Cur rent, Nothing))
Me.SqlDeleteCom mand1.Parameter s.Add(New
System.Data.Sql Client.SqlParam eter("@Original _DealId",
System.Data.Sql DbType.Int, 4, System.Data.Par ameterDirection .Input, False,
CType(0, Byte), CType(0, Byte), "DealId",
System.Data.Dat aRowVersion.Ori ginal, Nothing))
Do you know why this is happening? 3 2143
Logger,
Is there no row as well that says that you should not change designer
created code. (This is probably one of the reasons the partially classes are
created so that people keep the desinger created code alive.
Cor
I'm not sure what you are asking when you say is there a row that says not to
change the code. Can you clarify?
"Cor Ligthert[MVP]" wrote:
Logger,
Is there no row as well that says that you should not change designer
created code. (This is probably one of the reasons the partially classes are
created so that people keep the desinger created code alive.
Cor
ok I think I see what you are referring too.
Here's the line in the code
'NOTE: The following placeholder declaration is required by the Web Form
Designer.
'Do not delete or move it.
Private designerPlaceho lderDeclaration As System.Object
"Logger" wrote:
Help,
I’m applying updates to a web application that used Web Form Designer
Generated Code. I’m using Visual Studio 2003. For some reason lines keep
dropping out of the code in the .aspx.vb code behind file. Here’s the 2
lines that keep dropping. I think since the 1st line drops where the m_oConn
is being assigned with the connection string it is being dropped everywhere
it is being used. This of course causes errors when the program tries to
call the stored procedure. The error is "connection propery object has not
been initialized". This happens on every form I go into and modify with
visual studio.
Below is a small sample of the code.
1. Me.m_oConn = New
System.Data.Sql Client.SqlConne ction(clsUtil.G etConnString)
2. Me.SqlDeleteCom mand1.Connectio n = Me.m_oConn
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnos tics.DebuggerSt epThrough()Priv ate Sub
InitializeCompo nent()
1st LINE IS ADDED HERE!!
Me.m_DADeals = New System.Data.Sql Client.SqlDataA dapter
Me.SqlDeleteCom mand1 = New System.Data.Sql Client.SqlComma nd
'
'SqlDeleteComma nd1
'
Me.SqlDeleteCom mand1.CommandTe xt = "[DEALS_DELETE]"
Me.SqlDeleteCom mand1.CommandTy pe =
System.Data.Com mandType.Stored Procedure
2ND LINE IS ADDED HERE!!!!
Me.SqlDeleteCom mand1.Parameter s.Add(New
System.Data.Sql Client.SqlParam eter("@RETURN_V ALUE",
System.Data.Sql DbType.Int, 4, System.Data.Par ameterDirection .ReturnValue,
False, CType(0, Byte), CType(0, Byte), "",
System.Data.Dat aRowVersion.Cur rent, Nothing))
Me.SqlDeleteCom mand1.Parameter s.Add(New
System.Data.Sql Client.SqlParam eter("@Original _DealId",
System.Data.Sql DbType.Int, 4, System.Data.Par ameterDirection .Input, False,
CType(0, Byte), CType(0, Byte), "DealId",
System.Data.Dat aRowVersion.Ori ginal, Nothing))
Do you know why this is happening? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: John E Katich |
last post by:
When attempt to use the Event Wizard I get the following error message:
"Add/Remove of the function impossible, because the parent class code is
read only"
The Project was convert from VC 6.0. The files in question do not have the
Read-Only Attribute on.
Any Ideas?
|
by: D A H |
last post by:
I have gotten the same exception in multiple projects.
I have solved the underlying problem.
My question is if anyone knew of a setting that would cause this
exception to be thrown.
A codeveloper on the same project can get a copy of the project from
VSS and does not get this exception, ever. I do. We both have the
code that causes this exception to be thrown. We do NOT checkin our
|
by: Simon Harvey |
last post by:
Hi everyone,
I'm having a frustrating problem and I don't know how to fix it without
totally redoing a very complicated couple of pages on my site. I really hope
some kind soul can help me :-)
Its a very simple situation:
I have 1 page that serves to create and update users and another page to add
roles to the user.
|
by: Anders M |
last post by:
I'm trying to use Inline-code to call Page_load, Page_Init or Page_PreRender
methods.
I've also got a code behind c#-file.
I can define inline methods for buttons and so on...that works fine. But
when I try to call Page_load, Page_Init or Page_PreRender methods it doesn't
work.
Non of the methods get's triggered !?
|
by: Shapper |
last post by:
Hello,
When creating an ASP.NET/VB web site I place my code in a code behind
page, i.e., aspx.vb.
Sometimes I have functions which are common to all aspx files.
Is it possible in page1.aspx to use page1.aspx.vb and also a common file
named global.aspx.vb which will hold all the functions common to all
aspx files in a web site.
| |
by: MLH |
last post by:
I use A97 and do not always insert line numbers while
writing procedures. I find it necessary to go back and
add them later to aid in debugging.
Nearly 3 years ago, something was mentioned in this NG
to the effect that "...when you access a module programatically,
there is a lines collection..."
Have any of you experimented with your own procedures to
aid in numbering lines? Would the lines collection be of some
|
by: GTi |
last post by:
Is there any source code documentation tools available for Visual
Studio 2005 ?
I have created a LIB that must be documented. Must I do it by hand or
is it
some kind of tools to pre document my source code?
|
by: microdevsolutions |
last post by:
Hello
Our environment is
- pure .NET (ASP.NET, C#.NET, VB.NET)
- MCMS (templates, user controls, etc)
- Sharepoint (web parts, smart parts, etc)
I am wanting to gradually move our development environments and
applications from VS2003/.NET1.1 to VS2005/.NET 2.0. So that we can
utilise the testing tools I would like to firstly move the development
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |