PC Review


Reply
Thread Tools Rate Thread

how do I early bind

 
 
Martin Eyles
Guest
Posts: n/a
 
      15th Dec 2004
I have just turned on option strict in ASP/VB.net. I started by happily
going through and setting up all of the Dim statements with As clauses, and
making my cast explicit. However, I have now got stuck on "late binding".
After reading that early binding is faster, I think that it would be best to
make everything early binding, but I can't work out how. have but a sample
of my database code below. Can anyone tell me how to fix it?

Thanks,
Martin

Public Sub aSub()
'Allocate Variables
Dim adCmdText, aConnectionString, SQL As String
Dim R, F, RecsAffected As Object
Dim conn As Object

'set connection string for login to database
aConnectionString = "Provider=SQLOLEDB;Data Source=server;" _
& "Database=aDataBase;UID=aUserID;PWD=aPassword"
conn = Server.CreateObject("ADODB.Connection") 'make connection
object
'send connection string to database, via oject
conn.ConnectionString = aConnectionString
'open the connection
conn.Open()

SQL = ("SELECT aValue FROM aTable WHERE theCondition='" + aCondition
+ "'")
R = conn.execute(SQL, RecsAffected, adCmdText)
For Each F In R.Fields
Response.Write("") 'do nothing
Next
While Not R.EOF
For Each F In R.Fields
aValue = F.Value
Next
R.MoveNext()
End While

conn.Close()
End Sub

--
Martin Eyles
(E-Mail Removed)


 
Reply With Quote
 
 
 
 
Karl Seguin
Guest
Posts: n/a
 
      15th Dec 2004
Marin,
Glad to see you are turning on Option Explicit and Option Strict.

You can early bind like this:

dim connection as System.Data.SqlClient.SqlConnection

connection = new System.Data.SqlClient.SqlConnection

of course, if you Import System.Data.SqlClient at the top of your page, this
looks a lot nicer:

dim connection as SqlConnection
connection = new SqlConnection()

or

dim connection as SqlConnection = new SqlConnection()


also look at exception handling (try/catch) and if you are serious about
properly learning VB.Net, check out
http://www.amazon.com/exec/obidos/AS...185744-5788008


Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/


"Martin Eyles" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I have just turned on option strict in ASP/VB.net. I started by happily
> going through and setting up all of the Dim statements with As clauses,

and
> making my cast explicit. However, I have now got stuck on "late binding".
> After reading that early binding is faster, I think that it would be best

to
> make everything early binding, but I can't work out how. have but a

sample
> of my database code below. Can anyone tell me how to fix it?
>
> Thanks,
> Martin
>
> Public Sub aSub()
> 'Allocate Variables
> Dim adCmdText, aConnectionString, SQL As String
> Dim R, F, RecsAffected As Object
> Dim conn As Object
>
> 'set connection string for login to database
> aConnectionString = "Provider=SQLOLEDB;Data Source=server;" _
> & "Database=aDataBase;UID=aUserID;PWD=aPassword"
> conn = Server.CreateObject("ADODB.Connection") 'make connection
> object
> 'send connection string to database, via oject
> conn.ConnectionString = aConnectionString
> 'open the connection
> conn.Open()
>
> SQL = ("SELECT aValue FROM aTable WHERE theCondition='" +

aCondition
> + "'")
> R = conn.execute(SQL, RecsAffected, adCmdText)
> For Each F In R.Fields
> Response.Write("") 'do nothing
> Next
> While Not R.EOF
> For Each F In R.Fields
> aValue = F.Value
> Next
> R.MoveNext()
> End While
>
> conn.Close()
> End Sub
>
> --
> Martin Eyles
> (E-Mail Removed)
>
>



 
Reply With Quote
 
 
 
 
Martin Eyles
Guest
Posts: n/a
 
      15th Dec 2004
I have done that now, and the connection object complained that it didn't
have the execute method. I found there is a SqlCommand class too from an
example in the help, and so have added the following code:-

anSQLCommand = New System.Data.SqlClient.SqlCommand
anSQLCommand.Connection() = conn
anSQLCommand.CommandText = SQL

My problem is that there are four different execute... methods in the
SqlCommand object:- NonQuery, Reader, Scalar and XmlReader. Could you
explain which ones I need, and how to use them? Also, are these ADODB like
my old code, or are they the new ADO.net classes? Does this make any
difference?

Thanks again,
Martin

--
Martin Eyles
(E-Mail Removed)

"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:(E-Mail Removed)...
> Marin,
> Glad to see you are turning on Option Explicit and Option Strict.
>
> You can early bind like this:
>
> dim connection as System.Data.SqlClient.SqlConnection
>
> connection = new System.Data.SqlClient.SqlConnection
>
> of course, if you Import System.Data.SqlClient at the top of your page,

this
> looks a lot nicer:
>
> dim connection as SqlConnection
> connection = new SqlConnection()
>
> or
>
> dim connection as SqlConnection = new SqlConnection()
>
>
> also look at exception handling (try/catch) and if you are serious about
> properly learning VB.Net, check out
>

http://www.amazon.com/exec/obidos/AS...185744-5788008
>
>
> Karl
>
> --
> MY ASP.Net tutorials
> http://www.openmymind.net/
>
>
> "Martin Eyles" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I have just turned on option strict in ASP/VB.net. I started by happily
> > going through and setting up all of the Dim statements with As clauses,

> and
> > making my cast explicit. However, I have now got stuck on "late

binding".
> > After reading that early binding is faster, I think that it would be

best
> to
> > make everything early binding, but I can't work out how. have but a

> sample
> > of my database code below. Can anyone tell me how to fix it?
> >
> > Thanks,
> > Martin
> >
> > Public Sub aSub()
> > 'Allocate Variables
> > Dim adCmdText, aConnectionString, SQL As String
> > Dim R, F, RecsAffected As Object
> > Dim conn As Object
> >
> > 'set connection string for login to database
> > aConnectionString = "Provider=SQLOLEDB;Data Source=server;" _
> > & "Database=aDataBase;UID=aUserID;PWD=aPassword"
> > conn = Server.CreateObject("ADODB.Connection") 'make connection
> > object
> > 'send connection string to database, via oject
> > conn.ConnectionString = aConnectionString
> > 'open the connection
> > conn.Open()
> >
> > SQL = ("SELECT aValue FROM aTable WHERE theCondition='" +

> aCondition
> > + "'")
> > R = conn.execute(SQL, RecsAffected, adCmdText)
> > For Each F In R.Fields
> > Response.Write("") 'do nothing
> > Next
> > While Not R.EOF
> > For Each F In R.Fields
> > aValue = F.Value
> > Next
> > R.MoveNext()
> > End While
> >
> > conn.Close()
> > End Sub
> >
> > --
> > Martin Eyles
> > (E-Mail Removed)
> >
> >

>
>



 
Reply With Quote
 
Karl Seguin
Guest
Posts: n/a
 
      15th Dec 2004
Sorry, you are right, I changed you over from ADODB to ADO.Net...it does
make a difference. I obviously recommend that you move to ADO.Net, but now
might not be the correct time for you. If you are just doing this for
learning, strongly consider going with ADO.Net, if you have a deadline for a
project and ADODB is working, why not wait 'til downtime before rocking the
boat too much.

To use ADODB in a strongly-typed manner, you'll need to add a reference to
Microsoft ActiveX Data Object Library 2.7. You do this in VS.Net by right
clicking on "referneces", selecting "Add Reference", selecting the "COM" tab
and then picking that class.

Once added, you can do thigs like:
Dim connection As ADODB.Connection = New ADODB.Connection
connection.ConnectionString = ""

or

Dim rs as ADODB.Recordset = .....

and pretty much use it all like you are used to...

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/


"Martin Eyles" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I have done that now, and the connection object complained that it didn't
> have the execute method. I found there is a SqlCommand class too from an
> example in the help, and so have added the following code:-
>
> anSQLCommand = New System.Data.SqlClient.SqlCommand
> anSQLCommand.Connection() = conn
> anSQLCommand.CommandText = SQL
>
> My problem is that there are four different execute... methods in the
> SqlCommand object:- NonQuery, Reader, Scalar and XmlReader. Could you
> explain which ones I need, and how to use them? Also, are these ADODB like
> my old code, or are they the new ADO.net classes? Does this make any
> difference?
>
> Thanks again,
> Martin
>
> --
> Martin Eyles
> (E-Mail Removed)
>
> "Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
> wrote in message news:(E-Mail Removed)...
> > Marin,
> > Glad to see you are turning on Option Explicit and Option Strict.
> >
> > You can early bind like this:
> >
> > dim connection as System.Data.SqlClient.SqlConnection
> >
> > connection = new System.Data.SqlClient.SqlConnection
> >
> > of course, if you Import System.Data.SqlClient at the top of your page,

> this
> > looks a lot nicer:
> >
> > dim connection as SqlConnection
> > connection = new SqlConnection()
> >
> > or
> >
> > dim connection as SqlConnection = new SqlConnection()
> >
> >
> > also look at exception handling (try/catch) and if you are serious about
> > properly learning VB.Net, check out
> >

>

http://www.amazon.com/exec/obidos/AS...185744-5788008
> >
> >
> > Karl
> >
> > --
> > MY ASP.Net tutorials
> > http://www.openmymind.net/
> >
> >
> > "Martin Eyles" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > I have just turned on option strict in ASP/VB.net. I started by

happily
> > > going through and setting up all of the Dim statements with As

clauses,
> > and
> > > making my cast explicit. However, I have now got stuck on "late

> binding".
> > > After reading that early binding is faster, I think that it would be

> best
> > to
> > > make everything early binding, but I can't work out how. have but a

> > sample
> > > of my database code below. Can anyone tell me how to fix it?
> > >
> > > Thanks,
> > > Martin
> > >
> > > Public Sub aSub()
> > > 'Allocate Variables
> > > Dim adCmdText, aConnectionString, SQL As String
> > > Dim R, F, RecsAffected As Object
> > > Dim conn As Object
> > >
> > > 'set connection string for login to database
> > > aConnectionString = "Provider=SQLOLEDB;Data Source=server;" _
> > > & "Database=aDataBase;UID=aUserID;PWD=aPassword"
> > > conn = Server.CreateObject("ADODB.Connection") 'make

connection
> > > object
> > > 'send connection string to database, via oject
> > > conn.ConnectionString = aConnectionString
> > > 'open the connection
> > > conn.Open()
> > >
> > > SQL = ("SELECT aValue FROM aTable WHERE theCondition='" +

> > aCondition
> > > + "'")
> > > R = conn.execute(SQL, RecsAffected, adCmdText)
> > > For Each F In R.Fields
> > > Response.Write("") 'do nothing
> > > Next
> > > While Not R.EOF
> > > For Each F In R.Fields
> > > aValue = F.Value
> > > Next
> > > R.MoveNext()
> > > End While
> > >
> > > conn.Close()
> > > End Sub
> > >
> > > --
> > > Martin Eyles
> > > (E-Mail Removed)
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Martin Eyles
Guest
Posts: n/a
 
      15th Dec 2004
I can afford a bit of time to get it going in ADO.net. Have figured out how
to get one value with scalar now, I think. The only thing now is working
with more data.

I am used to:-

> > > "Martin Eyles" <(E-Mail Removed)> wrote in message
> > > news:(E-Mail Removed)...
> > > > R = conn.execute(SQL, RecsAffected, adCmdText)
> > > > For Each F In R.Fields
> > > > Response.Write("") 'do nothing
> > > > Next
> > > > While Not R.EOF
> > > > For Each F In R.Fields
> > > > aValue = F.Value
> > > > Next
> > > > R.MoveNext()
> > > > End While


I think the first line should become R=command.executeReader, but what class
of object is R, and what changes do I have to make to the rest?

Thanks,
ME

--
Martin Eyles
(E-Mail Removed)

"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:e$(E-Mail Removed)...
> Sorry, you are right, I changed you over from ADODB to ADO.Net...it does
> make a difference. I obviously recommend that you move to ADO.Net, but now
> might not be the correct time for you. If you are just doing this for
> learning, strongly consider going with ADO.Net, if you have a deadline for

a
> project and ADODB is working, why not wait 'til downtime before rocking

the
> boat too much.
>
> To use ADODB in a strongly-typed manner, you'll need to add a reference to
> Microsoft ActiveX Data Object Library 2.7. You do this in VS.Net by right
> clicking on "referneces", selecting "Add Reference", selecting the "COM"

tab
> and then picking that class.
>
> Once added, you can do thigs like:
> Dim connection As ADODB.Connection = New ADODB.Connection
> connection.ConnectionString = ""
>
> or
>
> Dim rs as ADODB.Recordset = .....
>
> and pretty much use it all like you are used to...
>
> Karl
>
> --
> MY ASP.Net tutorials
> http://www.openmymind.net/
>
>
> "Martin Eyles" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I have done that now, and the connection object complained that it

didn't
> > have the execute method. I found there is a SqlCommand class too from an
> > example in the help, and so have added the following code:-
> >
> > anSQLCommand = New System.Data.SqlClient.SqlCommand
> > anSQLCommand.Connection() = conn
> > anSQLCommand.CommandText = SQL
> >
> > My problem is that there are four different execute... methods in the
> > SqlCommand object:- NonQuery, Reader, Scalar and XmlReader. Could you
> > explain which ones I need, and how to use them? Also, are these ADODB

like
> > my old code, or are they the new ADO.net classes? Does this make any
> > difference?
> >
> > Thanks again,
> > Martin
> >
> > --
> > Martin Eyles
> > (E-Mail Removed)
> >
> > "Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
> > wrote in message news:(E-Mail Removed)...
> > > Marin,
> > > Glad to see you are turning on Option Explicit and Option Strict.
> > >
> > > You can early bind like this:
> > >
> > > dim connection as System.Data.SqlClient.SqlConnection
> > >
> > > connection = new System.Data.SqlClient.SqlConnection
> > >
> > > of course, if you Import System.Data.SqlClient at the top of your

page,
> > this
> > > looks a lot nicer:
> > >
> > > dim connection as SqlConnection
> > > connection = new SqlConnection()
> > >
> > > or
> > >
> > > dim connection as SqlConnection = new SqlConnection()
> > >
> > >
> > > also look at exception handling (try/catch) and if you are serious

about
> > > properly learning VB.Net, check out
> > >

> >

>

http://www.amazon.com/exec/obidos/AS...185744-5788008
> > >
> > >
> > > Karl
> > >
> > > --
> > > MY ASP.Net tutorials
> > > http://www.openmymind.net/



 
Reply With Quote
 
Karl Seguin
Guest
Posts: n/a
 
      15th Dec 2004
SqlDataReader dr = command.executeReader()
while dr.Read()
dim someField as string = cstr(dr("someColumn"))
end while

you might wanna check out an introduction on this sorta stuff such as
(http://www.sitepoint.com/article/introduction-ado-net/2) which I just got
from a google search...

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/


"Martin Eyles" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I can afford a bit of time to get it going in ADO.net. Have figured out

how
> to get one value with scalar now, I think. The only thing now is working
> with more data.
>
> I am used to:-
>
> > > > "Martin Eyles" <(E-Mail Removed)> wrote in message
> > > > news:(E-Mail Removed)...
> > > > > R = conn.execute(SQL, RecsAffected, adCmdText)
> > > > > For Each F In R.Fields
> > > > > Response.Write("") 'do nothing
> > > > > Next
> > > > > While Not R.EOF
> > > > > For Each F In R.Fields
> > > > > aValue = F.Value
> > > > > Next
> > > > > R.MoveNext()
> > > > > End While

>
> I think the first line should become R=command.executeReader, but what

class
> of object is R, and what changes do I have to make to the rest?
>
> Thanks,
> ME
>
> --
> Martin Eyles
> (E-Mail Removed)
>
> "Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
> wrote in message news:e$(E-Mail Removed)...
> > Sorry, you are right, I changed you over from ADODB to ADO.Net...it does
> > make a difference. I obviously recommend that you move to ADO.Net, but

now
> > might not be the correct time for you. If you are just doing this for
> > learning, strongly consider going with ADO.Net, if you have a deadline

for
> a
> > project and ADODB is working, why not wait 'til downtime before rocking

> the
> > boat too much.
> >
> > To use ADODB in a strongly-typed manner, you'll need to add a reference

to
> > Microsoft ActiveX Data Object Library 2.7. You do this in VS.Net by

right
> > clicking on "referneces", selecting "Add Reference", selecting the "COM"

> tab
> > and then picking that class.
> >
> > Once added, you can do thigs like:
> > Dim connection As ADODB.Connection = New ADODB.Connection
> > connection.ConnectionString = ""
> >
> > or
> >
> > Dim rs as ADODB.Recordset = .....
> >
> > and pretty much use it all like you are used to...
> >
> > Karl
> >
> > --
> > MY ASP.Net tutorials
> > http://www.openmymind.net/
> >
> >
> > "Martin Eyles" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > I have done that now, and the connection object complained that it

> didn't
> > > have the execute method. I found there is a SqlCommand class too from

an
> > > example in the help, and so have added the following code:-
> > >
> > > anSQLCommand = New System.Data.SqlClient.SqlCommand
> > > anSQLCommand.Connection() = conn
> > > anSQLCommand.CommandText = SQL
> > >
> > > My problem is that there are four different execute... methods in the
> > > SqlCommand object:- NonQuery, Reader, Scalar and XmlReader. Could you
> > > explain which ones I need, and how to use them? Also, are these ADODB

> like
> > > my old code, or are they the new ADO.net classes? Does this make any
> > > difference?
> > >
> > > Thanks again,
> > > Martin
> > >
> > > --
> > > Martin Eyles
> > > (E-Mail Removed)
> > >
> > > "Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME

net>
> > > wrote in message news:(E-Mail Removed)...
> > > > Marin,
> > > > Glad to see you are turning on Option Explicit and Option Strict.
> > > >
> > > > You can early bind like this:
> > > >
> > > > dim connection as System.Data.SqlClient.SqlConnection
> > > >
> > > > connection = new System.Data.SqlClient.SqlConnection
> > > >
> > > > of course, if you Import System.Data.SqlClient at the top of your

> page,
> > > this
> > > > looks a lot nicer:
> > > >
> > > > dim connection as SqlConnection
> > > > connection = new SqlConnection()
> > > >
> > > > or
> > > >
> > > > dim connection as SqlConnection = new SqlConnection()
> > > >
> > > >
> > > > also look at exception handling (try/catch) and if you are serious

> about
> > > > properly learning VB.Net, check out
> > > >
> > >

> >

>

http://www.amazon.com/exec/obidos/AS...185744-5788008
> > > >
> > > >
> > > > Karl
> > > >
> > > > --
> > > > MY ASP.Net tutorials
> > > > http://www.openmymind.net/

>
>



 
Reply With Quote
 
Martin Eyles
Guest
Posts: n/a
 
      16th Dec 2004
Thankyou,
I think there is plenty of information to read on this. I had
googled a bit, but it helps to know what you are googling for, so thanks for
the link too.

ME

--
Martin Eyles
(E-Mail Removed)

"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:(E-Mail Removed)...
> SqlDataReader dr = command.executeReader()
> while dr.Read()
> dim someField as string = cstr(dr("someColumn"))
> end while
>
> you might wanna check out an introduction on this sorta stuff such as
> (http://www.sitepoint.com/article/introduction-ado-net/2) which I just got
> from a google search...
>
> Karl
>
> --
> MY ASP.Net tutorials
> http://www.openmymind.net/
>
>
> "Martin Eyles" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I can afford a bit of time to get it going in ADO.net. Have figured out

> how
> > to get one value with scalar now, I think. The only thing now is working
> > with more data.
> >
> > I am used to:-
> >
> > > > > "Martin Eyles" <(E-Mail Removed)> wrote in message
> > > > > news:(E-Mail Removed)...
> > > > > > R = conn.execute(SQL, RecsAffected, adCmdText)
> > > > > > For Each F In R.Fields
> > > > > > Response.Write("") 'do nothing
> > > > > > Next
> > > > > > While Not R.EOF
> > > > > > For Each F In R.Fields
> > > > > > aValue = F.Value
> > > > > > Next
> > > > > > R.MoveNext()
> > > > > > End While

> >
> > I think the first line should become R=command.executeReader, but what

> class
> > of object is R, and what changes do I have to make to the rest?
> >
> > Thanks,
> > ME
> >
> > --
> > Martin Eyles
> > (E-Mail Removed)
> >
> > "Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
> > wrote in message news:e$(E-Mail Removed)...
> > > Sorry, you are right, I changed you over from ADODB to ADO.Net...it

does
> > > make a difference. I obviously recommend that you move to ADO.Net, but

> now
> > > might not be the correct time for you. If you are just doing this for
> > > learning, strongly consider going with ADO.Net, if you have a deadline

> for
> > a
> > > project and ADODB is working, why not wait 'til downtime before

rocking
> > the
> > > boat too much.
> > >
> > > To use ADODB in a strongly-typed manner, you'll need to add a

reference
> to
> > > Microsoft ActiveX Data Object Library 2.7. You do this in VS.Net by

> right
> > > clicking on "referneces", selecting "Add Reference", selecting the

"COM"
> > tab
> > > and then picking that class.
> > >
> > > Once added, you can do thigs like:
> > > Dim connection As ADODB.Connection = New ADODB.Connection
> > > connection.ConnectionString = ""
> > >
> > > or
> > >
> > > Dim rs as ADODB.Recordset = .....
> > >
> > > and pretty much use it all like you are used to...
> > >
> > > Karl
> > >
> > > --
> > > MY ASP.Net tutorials
> > > http://www.openmymind.net/
> > >
> > >
> > > "Martin Eyles" <(E-Mail Removed)> wrote in message
> > > news:(E-Mail Removed)...
> > > > I have done that now, and the connection object complained that it

> > didn't
> > > > have the execute method. I found there is a SqlCommand class too

from
> an
> > > > example in the help, and so have added the following code:-
> > > >
> > > > anSQLCommand = New System.Data.SqlClient.SqlCommand
> > > > anSQLCommand.Connection() = conn
> > > > anSQLCommand.CommandText = SQL
> > > >
> > > > My problem is that there are four different execute... methods in

the
> > > > SqlCommand object:- NonQuery, Reader, Scalar and XmlReader. Could

you
> > > > explain which ones I need, and how to use them? Also, are these

ADODB
> > like
> > > > my old code, or are they the new ADO.net classes? Does this make any
> > > > difference?
> > > >
> > > > Thanks again,
> > > > Martin
> > > >
> > > > --
> > > > Martin Eyles
> > > > (E-Mail Removed)
> > > >
> > > > "Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME

> net>
> > > > wrote in message news:(E-Mail Removed)...
> > > > > Marin,
> > > > > Glad to see you are turning on Option Explicit and Option Strict.
> > > > >
> > > > > You can early bind like this:
> > > > >
> > > > > dim connection as System.Data.SqlClient.SqlConnection
> > > > >
> > > > > connection = new System.Data.SqlClient.SqlConnection
> > > > >
> > > > > of course, if you Import System.Data.SqlClient at the top of your

> > page,
> > > > this
> > > > > looks a lot nicer:
> > > > >
> > > > > dim connection as SqlConnection
> > > > > connection = new SqlConnection()
> > > > >
> > > > > or
> > > > >
> > > > > dim connection as SqlConnection = new SqlConnection()
> > > > >
> > > > >
> > > > > also look at exception handling (try/catch) and if you are serious

> > about
> > > > > properly learning VB.Net, check out
> > > > >
> > > >
> > >

> >

>

http://www.amazon.com/exec/obidos/AS...185744-5788008
> > > > >
> > > > >
> > > > > Karl
> > > > >
> > > > > --
> > > > > MY ASP.Net tutorials
> > > > > http://www.openmymind.net/

> >
> >

>
>



 
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
From Early to Late bind Henk Microsoft Excel Programming 3 13th Feb 2009 09:36 AM
Early bind to Late bind Henk Microsoft Excel Programming 3 13th Feb 2009 01:59 AM
From Early to Late bind Henk Microsoft Excel Programming 0 12th Feb 2009 12:24 PM
From Early to Late bind Henk Microsoft Excel Programming 0 12th Feb 2009 12:20 PM
From Early to Late bind Henk Microsoft Excel Programming 0 12th Feb 2009 12:17 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:13 AM.