User Profile

Collapse

Profile Sidebar

Collapse
sc5502
sc5502
Last Activity: Oct 22 '18, 02:48 PM
Joined: Jun 23 '14
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • sc5502
    started a topic Reusable Code (Global Variables)

    Reusable Code (Global Variables)

    I have a set of variables that are used across multiple projects. How can the variables be reused? Can a dll be used?

    Thanks.
    See more | Go to post

  • sc5502
    replied to Excel connection strings
    I found my answer. The file name was misspelled.
    See more | Go to post

    Leave a comment:


  • sc5502
    started a topic Excel connection strings

    Excel connection strings

    I want to populate a data grid view from an Excel spreadsheet. Here is my code. I get an error

    System.Data.Ole Db.OleDbExcepti on: 'The Microsoft Access database engine could not find the object 'Sheet1$'. Make sure the object exists and that you spell its name and the path name correctly. If 'Sheet1$' is not a local object, check your network connection or contact the server administrator.'

    on the cmd.Fill(DT). What...
    See more | Go to post

  • sc5502
    started a topic Parent/Child Forms

    Parent/Child Forms

    I have a Parent Form (form1) that starts a child form (form2). Can the child form (form2) execute a routine that is already defined in the parent form (form1)? In my case the routine is one that displays a data grid view. If it can be done, how?

    Thanks in advance.
    See more | Go to post

  • sc5502
    started a topic Process integer fields

    Process integer fields

    I have an integer field that contains values from 1 to whatever. When it contains a 0 value, it means an unknown value. Can I display this in SQL

    Number
    -------
    1
    24
    Unknown
    876

    instead of this

    Number
    -------
    1
    24
    0
    876


    If it can be done how do I go about it? Thanks in advance.
    See more | Go to post

  • sc5502
    replied to Replacing an apostrophe with a space
    Here is the answer

    update [Record_Retentio n].[dbo].[Records]
    set contents = replace(content s, '''', ' ')
    where format='L' and status='Destroy ed'
    See more | Go to post

    Leave a comment:


  • sc5502
    started a topic Replacing an apostrophe with a space

    Replacing an apostrophe with a space

    I want to replace an apostrophe with a space in a SQL field. I have tried this bit does not work:
    Code:
    Update [Record_Retention].[dbo].[Records]
    Set    contents = replace(contents, ''''', ' ')
    where status='Destroyed' and format='L';
    What am I doing wrong? Thanks
    See more | Go to post

  • sc5502
    started a topic Like funtion

    Like funtion

    I have a table that is still SQL 2005. This table has a field defined as an int

    Code:
    RECD_NUMBER	int
    I want to perform a search on that field using the Like function.
    Code:
    SELECT *
    FROM [myDatabase].[dbo].[myTable]
    WHERE recd_number LIKE %2548%
    This does not not work. Any ideas? Thanks.
    See more | Go to post

  • sc5502
    started a topic Data Grid Views

    Data Grid Views

    I have a program with two forms, form1 ans form2. Form1 displays a data grid view (EX1) from a SQL table. Form2 allows you to modify the search criteria in the data grid. This is accomplished by pressing a button on form2 but showing the results on form1(EX2).

    This is the code in form1:
    Code:
    Public Shared Sub testsub()
        MsgBox("Hello")
        Call dgv()     '<<<<<<< Generates an
    ...
    See more | Go to post

  • sc5502
    replied to Forms talking to one another
    Thanks. It works except the subroutine in form 1 has code in it to load a data grid view.
    Code:
     Dim qry As String = "select recd_id, recd_number, recd_inventorydate from t021400_records order by recd_number desc;"
            Dim cs As String = "SERVER=techdev01;DATABASE=DB02_RECORD_MANAGEMENT;USER ID=db02;PASSWORD=db02;"
            Try
                Dim connectionString As String = cs
    ...
    See more | Go to post

    Leave a comment:


  • sc5502
    started a topic Forms talking to one another

    Forms talking to one another

    Background:

    Front end- MS Visual Studio/Visual Basic 2017
    Back end- MS SQL Server 2016


    I have two forms (Form1 and Form2). I know how to have Form2 pass data back to Form1. Can I have Form2 execute some code (specifically a sub routine) in Form1?

    Thanks in advance.
    See more | Go to post

  • sc5502
    started a topic Excel to SQL

    Excel to SQL

    On a scale of 1-10 (1 low and 10 high) my Excel rating would be 3 and my VB.net rating a 6.

    I have an excel file (exert attached). It was created by exporting data from a Sharepoint list into Excel. I want to read the Excel and put this is in two SQL Server tables. Here's the catch, the Excel is one record and I want to write it in two separate SQL tables (parent - child relationship).

    RefNum - Requestor make up the...
    See more | Go to post

  • sc5502
    started a topic How to calculate the difference in time

    How to calculate the difference in time

    I have an app that captures the start time and end time of a process.

    Start time:
    Code:
    lbl_Start.text = Now()         ' display start time
    Dim STARTx As DateTime = Now() ' capture start time
    '
    'Code follows
    '
    End Time
    Code:
    '
    'Code ends
    '
    lbl_STOPx.text = Now()        ' Display End Time
    Dim STOPx As DateTime = Now()  'Capture End Time
    ...
    See more | Go to post

  • sc5502
    replied to SQL Query?
    Thank you very much.
    See more | Go to post

    Leave a comment:


  • sc5502
    started a topic SQL Query?

    SQL Query?

    I have a SQL table with a field that has a length of 1. The field is named Status and has a value of I (inactive) or A (active). Status varchar(1). I want to show either Inactive or Active instead of just an I or A. Is this possible?
    See more | Go to post

  • sc5502
    started a topic How to make displays proportionate

    How to make displays proportionate

    Some background:

    Front end: MS VB.Net (2017 Professional)
    Back end: MS SQL Server 2012

    I have an application that will be displayed on different screen sizes (from 15" to 60").

    I want the application to automatically adjusted so all fields will adjust accordingly to fit the display where it is on a 15" laptop or a 60" Flat Screen.

    Is there a way to accomplish...
    See more | Go to post

  • sc5502
    started a topic using Convert in SQL

    using Convert in SQL

    Background: MS SQL Server 2008
    Experience Level (1-10 with 10 being expert): 5

    I know how to take a field that is defined in SQL server as datetime and extract the date only value.
    Code:
    SELECT  Convert(varchar(2),DATEPART(MONTH, regi_datetimein)) + '/' + Convert(varchar(2),DATEPART(DAY, regi_datetimein)) + '/' + Convert(varchar(4),DATEPART(year, regi_datetimein)) as v_date 
    from [DB04_Visitors].[dbo].[T040200_REGISTRATION]
    ...
    See more | Go to post

  • sc5502
    started a topic Radio Buttons - VB.Net

    Radio Buttons - VB.Net

    I have a group box with 5 radio buttons in it. When I start the program, the first one is checked. How do I get none of them to be checked when I start the program?
    See more | Go to post

  • sc5502
    started a topic Error Message
    in .NET

    Error Message

    I am attempting to make a change to a VB program. When I bring up the program in VS and attempt to run it the following error appears: Data at the root level is invalid. Line 1, position 39. (See attached).

    [imgnothumb]https://bytes.com/attachments/attachment/9216d1501243620/capture.jpg[/imgnothumb]

    The program was working fine the last time it was changed. What is wrong and how do I correct the problem?...
    See more | Go to post
    Last edited by Frinavale; Aug 4 '17, 05:52 PM.

  • sc5502
    replied to Radio Buttons
    Thank you very much.
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...