i'm having problems with the insert command in .NET
The Select statement works perfectly, but insert.. He gives an error when he
executes the command:
ExecuteNonQuery()
Check the code below..
Thanx in advance!
Public Sub voegToe(ByVal aproduct As Product)
Dim oConn As New OleDbConnection(mStrConn)
Dim sqlCmd As String = "INSERT INTO Product (ProductName, Color, Sizes, M_F,
Price, ProductTypeID, ProductClassID, UnitsInStock) VALUES (@ProductName,
@Color, @Sizes, @M_F, @Price, @ProductTypeID, @ProductClassID,
@UnitsInStock)"
Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
VANNESTE Xavier
do you have write access to your db "Davy Marichael" a écrit dans le message de news: %
Hi,
i'm having problems with the insert command in .NET The Select statement works perfectly, but insert.. He gives an error when he executes the command: ExecuteNonQuery()
Check the code below.. Thanx in advance!
Public Sub voegToe(ByVal aproduct As Product)
Dim oConn As New OleDbConnection(mStrConn)
Dim sqlCmd As String = "INSERT INTO Product (ProductName, Color, Sizes, M_F, Price, ProductTypeID, ProductClassID, UnitsInStock) VALUES (@ProductName, @Color, @Sizes, @M_F, @Price, @ProductTypeID, @ProductClassID, @UnitsInStock)"
My DB is added in the config file so i don't know what the problem COULD be..
I have the same problem with UPDATE & DELETE... Only SELECT works..
do you have write access to your db
"Davy Marichael" <da-ve@pandora.be> a écrit dans le message de news:
%23LgDcrENFHA.2420@TK2MSFTNGP10.phx.gbl...
Hi,
i'm having problems with the insert command in .NET
The Select statement works perfectly, but insert.. He gives an error when
he
executes the command:
ExecuteNonQuery()
Check the code below..
Thanx in advance!
Public Sub voegToe(ByVal aproduct As Product)
Dim oConn As New OleDbConnection(mStrConn)
Dim sqlCmd As String = "INSERT INTO Product (ProductName, Color, Sizes,
M_F,
Price, ProductTypeID, ProductClassID, UnitsInStock) VALUES (@ProductName,
@Color, @Sizes, @M_F, @Price, @ProductTypeID, @ProductClassID,
@UnitsInStock)"
do you have write access to your db "Davy Marichael" a écrit dans le message de news: %
Hi,
i'm having problems with the insert command in .NET The Select statement works perfectly, but insert.. He gives an error when he executes the command: ExecuteNonQuery()
Check the code below.. Thanx in advance!
Public Sub voegToe(ByVal aproduct As Product)
Dim oConn As New OleDbConnection(mStrConn)
Dim sqlCmd As String = "INSERT INTO Product (ProductName, Color, Sizes, M_F, Price, ProductTypeID, ProductClassID, UnitsInStock) VALUES (@ProductName, @Color, @Sizes, @M_F, @Price, @ProductTypeID, @ProductClassID, @UnitsInStock)"