| | |
The ConnectionString property has not been initialized
Please support our VB.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
•
•
Join Date: Nov 2008
Posts: 1
Reputation:
Solved Threads: 0
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 ?
“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 ?
•
•
Join Date: Oct 2008
Posts: 32
Reputation:
Solved Threads: 4
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
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
![]() |
Similar Threads
- how can i display data in textbox from choosen dropdown menu? (VB.NET)
- need some help in my code please (ASP.NET)
- login Form using Access database (VB.NET)
- datagrid (VB.NET)
- my code doest work (VB.NET)
- problem with connection to sql server (ASP.NET)
- Prblem with sql sever connection (ASP.NET)
Other Threads in the VB.NET Forum
- Previous Thread: can someone help me with saving my data in a file program?
- Next Thread: How can I show a form?
| Thread Tools | Search this Thread |
"crystal .net .net2005 30minutes 2005 2008 access account add arithmetic array assignment basic box button buttons center check code component connectionstring convert cpu crystalreport data database databasesearch datagrid datagridview design dissertation dissertations dissertationthesis dosconsolevb.net dropdownlist editvb.net excel file-dialog firewall folder ftp generatetags hardcopy image images insert intel isnumericfuntioncall math monitor mssqlbackend mysql navigate net networking opacity output passingparameters peertopeervideostreaming picturebox1 port printpreview problem problemwithinstallation project record reports" reuse savedialog searchvb.net select serial storedprocedure string tcp temp text textbox timer toolbox trim updown user useraccounts usercontrol vb vb.net vb.netcode vb.netformclosing()eventpictureboxmessagebox vb.nettoolboxvisualbasic2008sidebar vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio2008 web wpf





