fire_water
New member
- Joined
- Jul 13, 2009
- Messages
- 1
- Programming Experience
- Beginner
Ok so hopefully i can give enough information here. Our company has SQl 2005 on our server and I have Microsoft server management studio express and microsoft visual basic on my machine. I've created a new database "Product Pricing" with a table in it (Dbo.pricing information). It has 14 columns in it already.
I need to be able to add information to this and i have no idea how to.
I can access the database and retrieve the number of columns and rows with the following code:
Can anyone tell me how to add information, edit information, ect. to my database?
Thank you.
I need to be able to add information to this and i have no idea how to.
I can access the database and retrieve the number of columns and rows with the following code:
VB.NET:
Public Class Form1
Private Conn As New ADODB.Connection
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Conn.Open("Driver={SQL Server Native Client 10.0};Server=Fileserv;Database=Product Pricing;Uid=PPCPricing;Pwd=mastermind")
Dim rs As New ADODB.Recordset
rs.CursorLocation = ADODB.CursorLocationEnum.adUseClient
rs.CursorType = ADODB.CursorTypeEnum.adOpenStatic
rs.LockType = ADODB.LockTypeEnum.adLockBatchOptimistic
rs.Open("select * from [Pricing Information]", Conn)
Dim da As New System.Data.OleDb.OleDbDataAdapter()
Dim ds As New DataSet()
da.Fill(ds, rs, "Pricing Information")
Conn.Close()
MsgBox(ds.Tables(0).Columns.Count)
MsgBox(ds.Tables(0).Rows.Count)
End Sub
End Class
Can anyone tell me how to add information, edit information, ect. to my database?
Thank you.