Command Trext property not initialized RRS feed

  • Question

  • I am using Windows 8.1 with Visual Basic 2008 Express Edition 9.0..

    When I try to add a record I get the following Error message:

    ExecutiveReader:Command Text Property has not been initialized.

    I have opened the Table Adapter and clicked on fillby. In the properties windoe of the fillby the command text is set to text.

    I also had the problem with an older computer using Windows XL.

    Keith Butler

    Thursday, March 22, 2018 6:58 PM

All replies

  • Hi BWKeith,

    According to your description, you could not set empty string to adapter, you should set the CommandText property of the command object with your SELECT statement or stored procedure name, you cannot execute an empty command.

    Here is the article about filling datasets by using TableAdapter:

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Friday, March 23, 2018 3:22 AM
  • Hello Keith,

    Can you show us your SQL statement for the FillBy you are working on?

    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Friday, March 23, 2018 8:22 AM
  • And you are 100% sure that the table adapter is completely generated and did not stop because for instance something that lacks. 

    (Primary key or whatever)


    Friday, March 23, 2018 8:31 AM