Re: asp to asp.net with block variable not set error




<amitbadgi@xxxxxxxxx> wrote in message
news:1123277923.405322.294560@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hello Peter, Thankx for your reply, i wanted to know that since i am
> just creating a reference and thus how do i fix it, am i supp to
> initialize a value or sthing, please let me know. thankyou

What is rs supposed to be? I could make a guess that you are trying to
create a recordset and that you are using ADO in your ASP application? The
..NET data access technology is ADO.NET, which does not use recordsets. When
you write:

Dim rs As Object

in VB.NET, you are creating a reference to an object of type Object (Object
being the class that sits at the top of the .NET Framework class hierarchy).
I could simply say that to create an actual object, you would just change
the statement to:

Dim rs as New Object

Then, rs would contain the address of the of the instance. However, that
answer masks the differences between the languages and between ASP and
ASP.NET, and will probably only get you to the "next error".
In VB.NET, as opposed to "classic" VB/VBA, you are dealing with a new,
object oriented programming language with rules that are quite different
from those for VB/VBA.

To convert your current ASP applications properly, you'll need to understand
the new world of .NET and how it differs from older technologies.

Here are several places you can start your research from:

http://msdn.microsoft.com/VBasic/Learning/Migrating/

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vboriUpgradingFromVisualBasic60.asp

http://support.microsoft.com/default.aspx?scid=kb;en-us;317071

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/techmap_vbnet.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmscms02/html/cms_2002migrationnet.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/aspnetmigrissues.asp?frame=true


--
Peter [MVP Visual Developer]
Jack of all trades, master of none.


.



Relevant Pages

  • Re: Referencing an imbedded Excel worksheet
    ... Reference source not found. ... "Peter Jamieson" wrote: ... cells of the worksheet can have an either positive or negative value. ... depending on the value of the cell in the Excel worksheet. ...
    (microsoft.public.word.mailmerge.fields)
  • Calling a class in VB
    ... actual VB.NET app and I can't seem to get that to work. ... ASP apps and changed my code in the calling form to look as follows: ... ...Object reference not set to an instance of an object". ... appears that the debugger is not even getting to the data access code. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Pass object by value not working...
    ... Peter T ... the reference to the object is passed by value instead of ... Property Get NumberAs String ... Private Sub AnotherSub ...
    (microsoft.public.excel.programming)
  • Re: Re: Problem by sendig a fax
    ... Sorry Peter, I think I'm helpless here unless I can repro the problem ... But I don't have ASP expertise. ... > Dim A2kApp ... > - acting with the faxserver over an office component?? ...
    (microsoft.public.win2000.fax)
  • Re: Letter to Paul Gray
    ... Return and ask their client to approve it. ... Ok Peter, what was it about this bit that you failed to understand? ... The Online Services Helpdesk were telling me that I didn't have to get ... I explained that I had EVENTUALLY found the reference. ...
    (uk.business.accountancy)