| | |
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 |
Tag cloud for VB.NET
.net .net2008 2005 2008 access account application array arrays basic beginner browser button buttons center checkbox client code convert cuesent data database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic eclipse excel fade filter forms ftp generatetags gridview html images input insert intel internet lib listview mobile monitor net objects open panel passingparameters pdf picturebox port position print printing problem read remove richtextbox save searchvb.net select serial settings shutdown soap sorting sqlserver survey table temperature textbox timer timespan transparency trim update user validation vb vb.net vb.netformclosing()eventpictureboxmessagebox vb2008 vba vbnet visual visualbasic visualbasic.net visualstudio.net visualstudio2008 web webbrowser winforms wpf wrapingcode year





