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

Home Posts Topics Members FAQ

system err while calling fill method of 2nd data adapter

Hi,
I am having vb2003-net 1.1

Code was working fine yesterday, today getting error
-----------------------------------------------------------
error:
An unhandled exception of type 'System.Data.SqlClient.SqlException'
occurred in system.data.dll
Additional information: System error.
-----------------------------------------------------------
Last line is highlighted. error while calling method for second data
adapter
-----------------------------------------------------------
My Code is :
Dim mDataSet As New DataSet()

Dim mConn As New SqlConnection()
mConn.ConnectionString = "Data Source=localhost;initial
catalog=transport;integrated security=XXX"
mConn.Open()

Dim mStr1 As String = "select * from mItem"
Dim mStr2 As String = "select * from mPump"

Dim mAdapter1 As New SqlDataAdapter(mStr1, mConn)
mAdapter1.Fill(mDataSet, "mItem")

Dim mAdapter2 As New SqlDataAdapter(mStr2, mConn)
mAdapter2.Fill(mDataSet, "mPump")
--------------------------------------------------------------

Need help...

Thanks,
Regards,

Rachana

May 8 '07 #1
1 1066
Rachana,

Probably if you remove the
mConn.Open
it will work.

The dataadapter does its own opening of the connection as long as that is
not opened already.

Cor

"Rachana" <mb*********@gmail.comschreef in bericht
news:11**********************@u30g2000hsc.googlegr oups.com...
Hi,
I am having vb2003-net 1.1

Code was working fine yesterday, today getting error
-----------------------------------------------------------
error:
An unhandled exception of type 'System.Data.SqlClient.SqlException'
occurred in system.data.dll
Additional information: System error.
-----------------------------------------------------------
Last line is highlighted. error while calling method for second data
adapter
-----------------------------------------------------------
My Code is :
Dim mDataSet As New DataSet()

Dim mConn As New SqlConnection()
mConn.ConnectionString = "Data Source=localhost;initial
catalog=transport;integrated security=XXX"
mConn.Open()

Dim mStr1 As String = "select * from mItem"
Dim mStr2 As String = "select * from mPump"

Dim mAdapter1 As New SqlDataAdapter(mStr1, mConn)
mAdapter1.Fill(mDataSet, "mItem")

Dim mAdapter2 As New SqlDataAdapter(mStr2, mConn)
mAdapter2.Fill(mDataSet, "mPump")
--------------------------------------------------------------

Need help...

Thanks,
Regards,

Rachana

May 8 '07 #2

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

Similar topics

0
by: muralidharan | last post by:
WebForm1.aspx Code: <%@ Register TagPrefix="ComponentArt" Namespace="ComponentArt.Web.UI" Assembly="ComponentArt.Web.UI" %> <ComponentArt:TreeView id="TreeView1" Height="520"...
0
by: silesius | last post by:
I've been using VS 2003 to develop a webapplication using C#. Today I exported the application to a remote webserver I begun experiencing problems. It's a simple application that retrieves some...
4
by: huzz | last post by:
I have a mothod in a class that return a datareader object as show below and trying to assign the datareader object to a datagrid but getting this error message: CS0120: An object reference is...
2
by: Bernie Yaeger | last post by:
Is there any way to get into the internals of the data adapter fill method such that I could know its progress status? For example, using the fill method to load a 40,000 row table takes just a...
0
marktang
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,...
0
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...
0
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
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
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
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
bsmnconsultancy
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...

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.