943,917 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 7371
  • VB.NET RSS
Nov 15th, 2008
0

The ConnectionString property has not been initialized

Expand Post »
I am getting the following error

“The ConnectionString property has not been initialized’, while executing the below portion of code.checked that the below connection string is having value and not null.

(Data Source=NAWINSQL050;Initial Catalog=AlbatrossDB; Integrated Security=true)


objFormatOut = FormatDepartment.Format.FormatSelectById(m_intOutputFormat, oConn)<—--error occurs(The ConnectionString property has not been initialized’)


in the below section the same stored proc is execurted with out any error.

If m_intOutputFormat = 218 Then
oDS = oDataAccess.ExecuteDataset(oConn, "Stored Procedure", m_intProcYear, m_shtProcMonth, m_strSupplierId, m_strDistId, m_strDestinationCd)

Else
oDS = oDataAccess.ExecuteDataset(oConn, "Stored procedure", m_lngSourceOutputId, m_strSupplierId, m_strDistId,

m_strDestinationCd) <—--same connection string works here in this line and stored procedure executed

End If

Please advise as to what can be the issue and how this can be resolved ?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
harsha_abraham is offline Offline
1 posts
since Nov 2008
Dec 8th, 2008
0

Re: The ConnectionString property has not been initialized

Hi,
oConn.open() statement is missing

(Data Source=NAWINSQL050;Initial Catalog=AlbatrossDB; Integrated Security=true)

oConn.open()

objFormatOut = FormatDepartment.Format.FormatSelectById(m_intOutputFormat, oConn)

If m_intOutputFormat = 218 Then
oDS = oDataAccess.ExecuteDataset(oConn, "Stored Procedure", m_intProcYear, m_shtProcMonth, m_strSupplierId, m_strDistId, m_strDestinationCd)

Else
oDS = oDataAccess.ExecuteDataset(oConn, "Stored procedure", m_lngSourceOutputId, m_strSupplierId, m_strDistId,

m_strDestinationCd)

End If
Reputation Points: 12
Solved Threads: 4
Light Poster
reena12 is offline Offline
32 posts
since Oct 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: can someone help me with saving my data in a file program?
Next Thread in VB.NET Forum Timeline: Help with Visual Studio 2008





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC