954,515 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How in save data from a text box into table at vb 2005

Hi , i 'm a newbie in vs 2005, current developing a module that need user to key data at the text box and save it to table that created MySQL in vb, here is the code i had generated but it return an error of Sql Exception was unhandled : Invalid object name 'TABLE_NAME'.

Dim Conn As New SqlClient.SqlConnection
        Conn.ConnectionString = " Server= XXXX;UID=root;pwd=XXX;Database=XXXX;"
        Conn.Open()

        Dim ItemInfoPad As New SqlClient.SqlCommand("Insert into NC_Costing_Info_Pad(ip_item_code,ip_Version) values ('" & Text_Item_Code.Text & " ','" & Text_Version.Text & "')", Conn)


        ItemInfoPad.ExecuteNonQuery()

        Conn.Close()
        Conn = Nothing
mistyfy_t
Newbie Poster
5 posts since May 2008
Reputation Points: 10
Solved Threads: 0
 

If you've verified the connection string information and that you have insert permissions on the table, I would try add the owner or schema of table e.g.

INSERT INTO dbo.Table_name
RipperJT
Newbie Poster
23 posts since Jan 2007
Reputation Points: 13
Solved Threads: 3
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You