Murugan.com
Murugan Andezuthu Dharmaratnam

  |  HOME   |  BLOG   |  TWITTER   |  ARTICLES   |  8086  |  C++   |  VC++   |  ASP .NET   |  VB .NET   |  JAVA SCRIPT   |  MS SQL   |  MY   |  VIDEOS   |  DOWNLOADS   |  CONTACT ME   |  



ExecuteReader: CommandText property has not been initialized, asp.net,vb,mtablestring in getsqldata function

Home   ASP.NET  ExecuteReader: CommandText property has not been initialized, asp.net,vb,mtablestring in getsqldata function        


ExecuteReader: CommandText property has not been initialized

This error occurs when sql query is not present. 

Sql querys like "select * from tablename" has to be given to 
CommandText property of the Open Connection. 


Check the query . if CommandText Property is empty then 
add a query to it. 

MyConnection.Open()
Dim myCommand As New SqlCommand(mSqlString, MyConnection)
oSpReturnValue = myCommand.ExecuteNonQuery()

here mSqlString u put the query 
if msqlstring is empty the error occurs. 


Hope this solves the problem




  |  HOME   |  BLOG   |  TWITTER   |  ARTICLES   |  8086  |  C++   |  VC++   |  ASP .NET   |  VB .NET   |  JAVA SCRIPT   |  MS SQL   |  MY   |  VIDEOS   |  DOWNLOADS   |  CONTACT ME   |  

Copyright 2009 @ Murugan Andezuthu Dharmaratnam