Jump to content
Xtreme .Net Talk

Robby

Moderators
  • Posts

    3848
  • Joined

  • Last visited

Everything posted by Robby

  1. You can use this ADO example.... You can also use AOD.NET. Dim cnnTest As New ADODB.Connection() Dim rsChamps As ADODB.Recordset cnnTest.Open("Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=C:\test.mdb;") rsChamps = New ADODB.Recordset() rsChamps.Open(table, cnnTest, ADODB.CursorTypeEnum.adOpenKeyset, ADODB.LockTypeEnum.adLockPessimistic) 'we put the cursor in place rsChamps.MoveLast() rsChamps.AddNew() rsChamps.Fields(0).Value = txt1.Text rsChamps.Fields(1).Value = txt2.Text rsChamps.Fields(2).Value = Txt3.Text rsChamps.Fields(3).Value = txt4.Text rsChamps.Fields(4).Value = txt5.Text rsChamps.Fields(5).Value = txt6.Text rsChamps.Fields(6).Value = txt7.Text rsChamps.Fields(7).Value = txt8.Text Try rsChamps.Update() Catch 'if error MsgBox("Error " & Err.Description & Err.Number, , "Dummy") Exit Sub End Try cnnTest.Close()
  2. What method are you using?
  3. I'm not sur if this will answer your question, check it out... http://www.visualbasicforum.com/showthread.php?s=&threadid=37172
  4. The 20 Mbs file is included on the CD, or yes you can download it.
  5. I used the wizard the first week of having .net, it was simply to see what the before-and-after would be like. As CL and divil stated, you really need to do this manually. Also keep in mind that there is a compatability class that may not be supported by Microsoft (in the future).
  6. I'm not sure I understand your question. But I think it may have to do with the fact that a Dataset is disonnected from the DB.
  7. You can continue to use ADO in .NET if you wish. If you want to start with ADO.NET, there is much to learn, here's a start.... http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/adonetprogmsdn.asp
  8. You can include the Secured.mdw in the connection string... Make sure that E:\Documents and Settings\Secured.mdw is pointing to where your MDW file is. Also, your UserName, Password and MDB location Provider=Microsoft.Jet.OLEDB.4.0;Password=myPASSWORD;User ID=myUSERNAME;Data Source=E:\Documents and Settings\myDATABASE.mdb;Mode=ReadWrite;Extended Properties="";Jet OLEDB:System database=E:\Documents and Settings\Secured.mdw;Jet OLEDB:Registry Path="";Jet OLEDB:Database Password="";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False
  9. Register to a site to get tutorials? Here's a few sites to get you started... http://samples.gotdotnet.com/quickstart/aspplus/default.aspx?url=/quickstart/aspplus/doc/webdataaccess.aspx http://gotdotnet.com http://asp.net http://www.aspalliance.com http://msdn.microsoft.com/
  10. Here's a couple of good sites... http://samples.gotdotnet.com/ and http://www.asp.net
  11. This should get the Index... 'if you declare a Dataview, you can do this... Dim strCurrentCountryID As String = DataViewCountry(DataGridCountry.CurrentRowIndex)("ID").ToString
  12. Using a Dataview, try this... If you are using another method, let me know. Dim strCurrentCountryID As String = DataViewCountry(DataGridCountry.CurrentRowIndex)("ID").ToString DataViewCity.RowFilter = "ID = " & strCurrentCountryID With DataGridCity .DataSource = DataViewCity End With
  13. You can do this for column number.... MessageBox.Show(myGrid1.CurrentCell.ColumnNumber.ToString) Row number... MessageBox.Show(myGrid1.CurrentCell.RowNumber.ToString) Both row and column (as string) MessageBox.Show(myGrid1.CurrentCell.ToString)
  14. Are the questions in a database?
  15. oh, I just noticed that this is in .NET. Sorry.
  16. ControlBox includes the Min and Max. So it's not only the Close.
  17. Sure, right after you Set the New Form.
  18. you can set ControlBox to False
  19. I believe that each workstation needs the Frameworks installed.
  20. Here's a sample, I put a lot more code then is needed only to illustrate classes. I'm very new to .NET as well, I'm sure now we'll see 100 better solutions pop up. Place the whole thing in the code window of a new form... Public Class Form1 Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents Button1 As System.Windows.Forms.Button <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.Button1 = New System.Windows.Forms.Button() Me.SuspendLayout() ' 'Button1 ' Me.Button1.Location = New System.Drawing.Point(88, 48) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(104, 40) Me.Button1.TabIndex = 0 Me.Button1.Text = "Button1" ' 'Form1 ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.ClientSize = New System.Drawing.Size(292, 273) Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Button1}) Me.Name = "Form1" Me.Text = "Form1" Me.ResumeLayout(False) End Sub #End Region Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim ms As New hello("Hello World") MessageBox.Show(ms.GetMessage()) End Sub Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing Dim ms As New hello("Good-Bye World") MessageBox.Show(ms.GetMessage()) End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 'This will demo divils' example Dim ms As Class1 ms.Main() End Sub End Class Class Class1 'Class1 is to demo divils' example Shared Sub Main() System.Console.WriteLine("Hello, World!") End Sub End Class Public Class hello Private msg As String Private SpeakOut As String Public Property GetMessage() As String Get Return SpeakOut End Get Set(ByVal Value As String) msg = SpeakOut End Set End Property Sub SetMessage() Try Dim oMsg As Object = msg SpeakOut = oMsg Catch SpeakOut = "" End Try End Sub Sub ResetString() msg = "" End Sub Sub New(ByVal newMsg As String) msg = newMsg MyClass.SetMessage() End Sub Protected Overrides Sub Finalize() ResetString() MyBase.Finalize() End Sub End Class
  21. Because you need to use the VB tags .... [ vb ] 'your code goes here..... (remove the spaces in the [tags] [/ vb]
  22. Most of us have both installed on the same box and they work very well side-by-side.
  23. if you use keywords like 'Walkthroughs' or 'Classes', you will get some good results. You'll appreciate the walkthoughs, allthough they are not very complex, it allows you to build them from the ground up. (as apposed to a sample project which has aleady been completed for you)
  24. Sometimes I don't know where my brain is, you're right, it's on the components CD.
  25. In .NET there are many 'Walkthroughs' you can learn from. Search the help file. There is also some help on understanding 'Classes'.
×
×
  • Create New...