| | |
The ConnectionString property has not been initialized
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
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 arithmetic array assignment basic binary bing box button buttons center check code combobox component connectionstring convert cpu crystalreport data database databasesearch datagrid datagridview design dissertation dissertations dissertationthesis dosconsolevb.net dropdownlist editvb.net employees excel file-dialog firewall folder ftp google hardcopy image images isnumericfuntioncall login math memory mobile ms mssqlbackend mysql navigate net networking opacity output peertopeervideostreaming picturebox1 port printpreview problemwithinstallation project record reports" reuse save savedialog searchbox serial soap storedprocedure string tcp temp text textbox timer toolbox trim updown useraccounts usercontrol vb vb.net vb.netcode vb.nettoolboxvisualbasic2008sidebar vb2008 vbnet view vista visual visualbasic visualbasic.net visualstudio web wpf





