Killsoft Sugdok

.Net Program Codes

Go down

.Net Program Codes

Post by Admin on Sat Mar 09, 2013 7:41 am

Post your .net code her.... Cool

[You must be registered and logged in to see this image.]
avatar
Admin
Admin
Admin

Posts : 14
Join date : 2013-03-09

http://killsoft.1talk.net

Back to top Go down

Re: .Net Program Codes

Post by waimuntupai on Sat Jun 01, 2013 12:51 pm

Why display syntax error in INSERT INTO ?
[You must be registered and logged in to see this link.]
Try
'get connection string declared in the Module1.vb and assing it to conn variable
conn = New OleDbConnection(Get_Constring)
conn.Open()
cmd.Connection = conn
cmd.CommandType = CommandType.Text


sSQL = "INSERT INTO 30/5/2013 (ID, ProductName, Quantity, SellingPrice) "
sSQL = sSQL & "VALUES (@ID, @ProductName, @Quantity, @SellingPrice)"
cmd.CommandText = sSQL

cmd.Parameters.Add("@ID", OleDbType.VarChar).Value = IIf(Len(Trim(Me.txtID.Text)) > 0, Me.txtID.Text, DBNull.Value)
cmd.Parameters.Add("@ProductName", OleDbType.VarChar).Value = IIf(Len(Trim(Me.txtProduct.Text)) > 0, Me.txtProduct.Text, DBNull.Value)
cmd.Parameters.Add("@Quantity", OleDbType.Numeric).Value = IIf(Len(Trim(Me.txtQuantity.Text)) > 0, Me.txtQuantity.Text, DBNull.Value)
cmd.Parameters.Add("@SellingPrice", OleDbType.Currency).Value = IIf(Len(Trim(Me.txtSellingPrice.Text)) > 0, Me.txtSellingPrice.Text, DBNull.Value)

cmd.ExecuteNonQuery()



Catch ex As Exception
MsgBox(ErrorToString)
Finally
conn.Close()
End Try

waimuntupai
Newbie
Newbie

Posts : 1
Join date : 2013-06-01

Back to top Go down

Re: .Net Program Codes

Post by Admin on Sat Jun 08, 2013 7:40 am

oh thanks for your info.....
avatar
Admin
Admin
Admin

Posts : 14
Join date : 2013-03-09

http://killsoft.1talk.net

Back to top Go down

Re: .Net Program Codes

Post by mariano12 on Thu Sep 12, 2013 8:54 am

thanks for this!!.,,,,,,,,,,,,,

mariano12
Newbie
Newbie

Posts : 2
Join date : 2013-09-12

Back to top Go down

Re: .Net Program Codes

Post by Admin on Sat Nov 09, 2013 6:10 pm

i think your path....

ill try to ask sugdok...
avatar
Admin
Admin
Admin

Posts : 14
Join date : 2013-03-09

http://killsoft.1talk.net

Back to top Go down

Re: .Net Program Codes

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum