I have a set of variables that are used across multiple projects. How can the variables be reused? Can a dll be used?
Thanks.
User Profile
Collapse
-
Reusable Code (Global Variables)
-
I found my answer. The file name was misspelled. -
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... -
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. -
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. -
Here is the answer
update [Record_Retentio n].[dbo].[Records]
set contents = replace(content s, '''', ' ')
where format='L' and status='Destroy ed'Leave a comment:
-
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';
-
Like funtion
I have a table that is still SQL 2005. This table has a field defined as an int
Code:RECD_NUMBER int
Code:SELECT * FROM [myDatabase].[dbo].[myTable] WHERE recd_number LIKE %2548%
-
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
-
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
Leave a comment:
-
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. -
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... -
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 '
Code:' 'Code ends ' lbl_STOPx.text = Now() ' Display End Time Dim STOPx As DateTime = Now() 'Capture End Time
-
-
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? -
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... -
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]
-
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? -
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?...Last edited by Frinavale; Aug 4 '17, 05:52 PM. -
No activity results to display
Show More
Leave a comment: