473,479 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

The New thing

What is the difference between

Dim objDataSet As DataSet = New DataSet()
and
Dim objDataSet As New DataSet()
and
Dim objDataSet As DataSet()
Set objDataSet = New DataSet()

(if any?)

Regards /Snedker
Nov 21 '05 #1
3 981
In the third example, there are 2 problems:

Dim objDataSet as DataSet() declares an array of dataset
So
Set objDataSet = New DataSet() would not work, since you would be trying to
assing one DataSet to a variable that holds an array of datasets. Also,
there is no need for 'Set' in VB.NET.

But, if you had it:

Dim objDataSet as DataSet
objDataSet = New DataSet()

Then all 3 would be equivalent.

"Morten Snedker" <morten_spammenot_ATdbconsult.dk> wrote in message
news:d9********************************@4ax.com...
What is the difference between

Dim objDataSet As DataSet = New DataSet()
and
Dim objDataSet As New DataSet()
and
Dim objDataSet As DataSet()
Set objDataSet = New DataSet()

(if any?)

Regards /Snedker

Nov 21 '05 #2
http://msdn.microsoft.com/library/de...newkeyword.asp

chanmm

"Morten Snedker" <morten_spammenot_ATdbconsult.dk> wrote in message
news:d9********************************@4ax.com...
What is the difference between

Dim objDataSet As DataSet = New DataSet()
and
Dim objDataSet As New DataSet()
and
Dim objDataSet As DataSet()
Set objDataSet = New DataSet()

(if any?)

Regards /Snedker

Nov 21 '05 #3
On Thu, 13 Jan 2005 09:51:49 -0500, "Marina" <so*****@nospam.com>
wrote:
But, if you had it:

Dim objDataSet as DataSet
objDataSet = New DataSet()


That was the case. Typo from my part. Thank you both for your input
and time.
Regards /Snedker
Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1200
by: Rich | last post by:
Hello, my project (vb2005) contains several classes that each produce lists of data which get stored/displayed in ado.net tables that have the same structure for each of the lists produced by...
3
2378
by: Tony Lance | last post by:
Big Bertha Thing spider Cosmic Ray Series Possible Real World System Constructs http://web.onetel.com/~tonylance/spider.html Access page JPG 11K Image Astrophysics net ring Access site...
0
1183
by: Tony Lance | last post by:
Big Bertha Thing Battle Cosmic Ray Series Possible Real World System Constructs http://web.onetel.com/~tonylance/battle.html Access page to 600K ZIP file Astrophysics net ring access site...
0
1493
by: Tony Lance | last post by:
Big Bertha Thing progress Cosmic Ray Series Possible Real World System Constructs http://web.onetel.com/~tonylance/progress.html Access page to 6K Web page Astrophysics net ring access site...
0
1173
by: Tony Lance | last post by:
Big Bertha Thing lightcraft Cosmic Ray Series Possible Real World System Constructs http://web.onetel.com/~tonylance/liteship.html 14K Web page Astrophysics net ring Access site Newsgroup...
0
1316
by: Tony Lance | last post by:
Big Bertha Thing invite Cosmic Ray Series Possible Real World System Constructs http://web.onetel.com/~tonylance/invite.html Access page to 55K Zip File Astrophysics net ring access site...
5
1364
by: gz | last post by:
Hi All, I am wondering if the notion of interface is a C# thing or .NET thing. In other words, is it supported at the language level, like C++'s support of classes, or at the runtime level?...
1
1953
by: Eric Hanchrow | last post by:
(This is with Python 2.5.2, on Ubuntu Hardy, if it matters.) This seems so basic that I'm surprised that I didn't find anything about it in the FAQ. (Yes, I am fairly new to Python.) Here are...
3
1649
by: J. Cliff Dyer | last post by:
On Thu, 2008-05-08 at 12:00 -0700, Eric Hanchrow wrote: It's the same reason as this: 5 5 6 5 Python "variables" are just names that point at objects. When you
25
1428
by: Dmitry S. Makovey | last post by:
Hi, after hearing a lot about decorators and never actually using one I have decided to give it a try. My particular usecase is that I have class that acts as a proxy to other classes (i.e....
0
6899
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7019
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7067
jinu1996
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...
1
6719
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...
0
6847
tracyyun
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...
0
5312
agi2029
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,...
0
2980
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1288
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
555
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.