vb.net - Using Access 2007 Queries From VB .NET -


build all the necessary questions I have been connected through the use of a database setup which I ODBC, Access files Already and I would be easy to call them from within my application.

I am using Visual Basic .NET and this is what I have tried so far .....

Thanks in advance, any help you can offer.

Ben

  dim command OdbcCommand = new OdbcCommand command.Connection = CNX command.CommandText = "sp_InsertClient" As command.CommandType = CommandType.StoredProcedure '// == ==== ABN paramenter make ============= dim param1 OdbcParameter = new OdbcParameter ( "inABN", as ABN) param1.Direction = ParameterDirection.Input param1.DbType = DbType.String 'ABN parameter command.Parameters.Add (param1) dim dataAdapter add OdbcDataAdapter = new OdbcDataAdapter (order) dataAdapter.InsertCommand = command cnx.Open (effort) dataAdapt er.InsertCommand.ExecuteNonQuery () capture MessageBox as former exception. Show (ex.Message, "Error", _ MessageBoxButtons.OK, MessageBoxIcon.Error) Su quit attempt Vice end cnx.Close () End Select MessageBox.Show ( "full")  

So, what's your question?

In the above code, you should not need a dataAdapter
you could say command.ExecuteNonQuery () to work

Edit it:.. In addition, you can wrap OdbcConnection & amp; Compose the ODBC in the block

by using the block.

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -