Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
R

Randy S

@Randy S
About
Posts
11
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • fastest way to copy a table to a new table
    R Randy S

    I'm not sure why you want to pull the entire months of tables data. I suspect that the data set will take some time to fill. You could try a paramtized query. Only fill the dataset withthe requested row. The difference is you would add "Where RecID = ? ". Your form would then have a text box for the user to enter an ID and a button to retrieve the data. Is this something that you could use?

    Visual Basic csharp help question

  • Calculation errors
    R Randy S

    The problem is that I am pulling data from Microsoft Access. No matter what data type I use in Access I can only place that data in a Single data type within VB. I used a little cheatiing by multiplying the return value by 100 and then transfering to a double and then deviding by 100. This if fine if the data in Access is currency but other data would just have to only be transfered to a VB single data type.

    Visual Basic question

  • Calculation errors
    R Randy S

    Is something wrong or is this OK. If I add two variables with a data type of single and like (845.12 + 312.14) and sent this directly to a text property of a label the display shows 1157.26. But if I store the sum into a variable with a data type of Double then display, it shows 1157.26000976563. Am I not allowed to convert a single to a double?

    Visual Basic question

  • Serializing
    R Randy S

    I would just save toa text file. Then you could read from the file to restore the valus. It is easy. You need System.io an duse stream reader and stream writer. I have a logon form which is check for a saved user name from a file at load. And on Enter I save the user name to this same file. That way the user name is remembered when the program is ended and then restarted. Ex. ( sName4User is global variable, Private Sub frmLogon_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ' This will retreive a user name from file if present. ' Opens a file stream for reading Dim myFS As New FileStream("c:\winnt\Temp\User.txt", FileMode.OpenOrCreate, FileAccess.Read, FileShare.None) Dim myReader As New StreamReader(myFS) ' Assigning a reader sName4User = myReader.ReadLine 'Retreives username If Not sName4User Is Nothing Then txtName.Text = sName4User End If myReader.Close() End Sub Private Sub btnEnter_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEnter.Click 'Storing username to file and closing if a username was entered If txtName.Text <> "" Then sName4User = txtName.Text ' Opens a file stream for reading Dim myFS As New FileStream("C:\winnt\Temp\User.txt", FileMode.OpenOrCreate) Dim myWriter As New StreamWriter(myFS) ' Assinging a reader myWriter.WriteLine(sName4User) ' Storing to the file myWriter.Close() Me.DialogResult = DialogResult.OK Else txtName.Text = "Enter a user name" txtName.Focus() txtName.SelectAll() End If End Sub

    Visual Basic help tutorial question

  • Automating movement of files from Within Windows console app to ftp Site
    R Randy S

    I've been meaning to reply sooner but I've had a battle with my web server. and I haven't won yet. I have a copy of the class I used for the FTP transfer. It will need some modifications but it may be a start for you. You can find it at ftp://4.10.187.76/FTP download class/clsFTP.vb just do a copy of the text and past into an empty class file. There are many notes in the file.

    Visual Basic xml help

  • Automating movement of files from Within Windows console app to ftp Site
    R Randy S

    I did somthing like this. I have a error message saved to a file in .TXT then that file is sent to a FTP server. Most of the work is done in a class which is called after the file is created in a temp folder on the C: drive. Is this something like what you are looking for?

    Visual Basic xml help

  • Send and receive file on VB.NET
    R Randy S

    You can send files to and from a share in your network if you only need to stay within an intranet. I've done this with system.IO. Is this what you're refering to?

    .NET (Core and Framework) csharp sysadmin question

  • creating a Form Having Return Value
    R Randy S

    Try this 1st dim your second form from your main form. 2nd In the second form user will enter data into any object (text rdo...) 3rd exiting the form will be "me.hide". 4th control is then back to the main form at which point you can read the values that are in the objects of the second form. ex; Dim findEntry As New frmSearch findEntry.ShowDialog() 'Form is shown. Used to set variables for search If findEntry.DialogResult <> DialogResult.Abort Then ' Do search when true, = Abort when cancel btn clicked sSearchText = findEntry.txtSearchText.Text sSearchItem = CStr(findEntry.cboItems.SelectedItem) findEntry.Close() sSearch is a variable which is assigned the value from the second form. Last step is to close the second form.

    Visual Basic question

  • Binding Objects
    R Randy S

    I simulated what you said you did and I get an error for partRecords that says "Declaration expected" on the mouse over tip for partRecords, which has the curvy blue line under it. Is that what you got? If so you need to put that code in a sub. It would most likely go in the form loading sub. To create this sub you can double click the form while in [Design] view. If I'm underestimating your intellegence I don't mean to. I just don't know how much VB you know.

    Visual Basic database wpf wcf help

  • Binding Objects
    R Randy S

    I have put together a sample which may help. You can download this from my FTP server. You can access by IP address which will change in time so don't wait too long to download. The files are in a folder called "RandysBoundControls Two Tables". It is about 1.7meg. This is a project I did for school. It should be fully functional. The database is in Access and is stored in the Bin folder. If you recreate the dataset, a .vb file will be rewritten and the lines of code I put there for setting a default value will no longer be there. This will cause an error when you add. Default values are needed for Dates(Date Time Picker) and check boxes (more notes are in the project). I suggest you make a copy. You can program bindings but I did the binding at design time. Look at the DataBindings section of properties for the text boxes. There is a text property there for binding textboxes. The file is at FTP://4.10.187.76

    Visual Basic database wpf wcf help

  • Binding Objects
    R Randy S

    Use the .fill method of the dataAdapter at load time. Just follow this syntax, 'daInventory.Fill(dsInv1)' You may need to include the table name if there is more then one for your dataset. When your objects on the form are linked you will want to use a Binding ManagerBase to navigate. Then you will use the .Position to change the displayed values. This is all easier if you have some sample code. Is any of this familiar or is all this new? Would you like a code sample?

    Visual Basic database wpf wcf help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups