|
You might want to verify the Requirements for VS 2022. Google for following. Don't worry about 'suggested', just look at minimum.
visual studio 2022 requirements
Before doing anything you might want to take a look at the docs/examples for Office 365. If you did MS Access programming in the past I suspect you are going to find that this (365) will be significantly different. But I haven't looked at it in depth.
|
|
|
|
|
I use Visual Studio 2010. I recommend building a library of books such as Professional Visual Studio 2010, Programming Microsoft ado.net 2.0, Microsoft's SQL server 2008 T-SQL Fundamentals. install SQL server and ssms. ask the pilot how to write the functions you need.
ramsey
|
|
|
|
|
I'm confused, why would I go backwards if I've already been developing apps with VS 2012 that are integrated with Access (accdb) Office 365? What am I missing here?
|
|
|
|
|
He's just mentioning that he uses 2010. I think his main point is about developing a collection of books.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
new one(latest) is the best,
use VS2022
|
|
|
|
|
Hi,
I am looking for a solution to transfer my mysql data into
tally using vb6.
please help me.
|
|
|
|
|
Google for "Tally import data VB6" and you'll find that you have to export your MySQL data into an XML format that is Tally compliant. Once you have those file(s), Tally can import those file(s) directly.
Don't even think of asking for code. VB6 has been dead for over 20 years now and I have never used Tally, nor will I ever.
|
|
|
|
|
I would want to prompt user to select a tool name from combobox1, then out automatically, combobox2 gets filled with tool description and size, which is a column in the selected table. Currently i have been using the following code, however the problem comes when i would like to update the database and add another table. This would mean adding the code in the application as well. I would like the application to be able to detect that a new tool table has been added and show that automatically without having to code again
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
' ADDING TABLE NAMES TO COMBOBOX 1 (TOOL NAME)
con.Open()
Dim schemaTable As DataTable = con.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, New Object() {Nothing, Nothing, Nothing, "TABLE"})
For Each dr As DataRow In schemaTable.Rows
Combobox1.Items.Add(dr.Item("TABLE_NAME"))
Next
End Sub
Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles Combobox1.SelectedIndexChanged
'FILLING COMBOBOX 2 (TOOL DESCRIPTION AND SIZE) DEPENDING ON SELECTION IN COMBOBOX 1 (TOOL NAME)
If Combobox1.SelectedIndex = 1 Then
Combobox2.Text = ""
con.Open()
Combobox2.Items.Clear()
Dim dr As OleDbDataReader
Dim cmd As New OleDbCommand
cmd.CommandText = "Select * from 14_POUND_HAMMER"
cmd.Connection = con
dr = cmd.ExecuteReader
While dr.Read
Combobox2.Items.Add(dr.GetString(1))
End While
dr.Close()
con.Close()
ElseIf Combobox1.SelectedIndex = 2 Then
Combobox2.Text = ""
con.Open()
Combobox2.Items.Clear()
Dim dr As OleDbDataReader
Dim cmd As New OleDbCommand
cmd.CommandText = "Select * from 3_QUARTER_IMPACT_WRENCH"
cmd.Connection = con
dr = cmd.ExecuteReader
While dr.Read
Combobox2.Items.Add(dr.GetString(0))
End While
dr.Close()
con.Close()
ElseIf Combobox1.SelectedIndex = 3 Then
Combobox2.Text = ""
con.Open()
Combobox2.Items.Clear()
Dim dr As OleDbDataReader
Dim cmd As New OleDbCommand
cmd.CommandText = "Select * from ABRASIVE_CUT_OFF_SAW "
cmd.Connection = con
dr = cmd.ExecuteReader
While dr.Read
Combobox2.Items.Add(dr.GetString(0))
End While
dr.Close()
con.Close()
|
|
|
|
|
Whay are you using manual code to fill the comboboxes? Use DataAdapters and DataBinding and the framework will do it for you. You can also set triggers on the database so you get notified when a new product is added.
|
|
|
|
|
Lots of problems here.
Kudzanai Victor wrote: Select * from ABRASIVE_CUT_OFF_SAW
Problem 1 (most serious): The name of the tool should be kept IN a database column. It should NOT be a table.
Design you are looking for is likely like this
Table: Tool
Columns: Id, Name, Description
Table: Tool_Attribute
Columns: Tool_Id, Name, Description
If you need more detail for Attribute you might add one or two more columns. If more detail than that is added then you might need an additional third table.
Once you do the above then getting a list of all tools consists of querying the first table. This includes name, description AND the id.
Then detail for a single tool is gotten by using the id from the above list.
------------------------------------------
Kudzanai Victor wrote: Select * from ABRASIVE_CUT_OFF_SAW
Problem 2: Don't use the asterisk.
Rather explicitly name the columns that you want to retrieve.
|
|
|
|
|
I have a SQLite DB attached to a VB.Net app. I have about two years of data I would like to not loose.
So with DB Browser I can change the two fields from TEXT to INTEGER.
Then make necessary changes in the code to reflect the changes in the DB.
Below are the variables that are declared in a Data Module used for searching
Public gvYear As String
Public gvFromMonth As Integer
Public gvToMonth As Integer
Only change here gvYear will become an Integer
Here is the code that created the original DB
Public Sub makeTxData()
'create table TxDataTable String for cmd
Dim create_table As String = String.Empty
create_table = "CREATE TABLE IF NOT EXISTS TxData(
TID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
txSortDate TEXT,
txYear TEXT,
txType TEXT,
txAmount TEXT,
txCKNum TEXT,
txDesc TEXT,
txBalance TEXT,
txSearchMonth TEXT)"
Dim dbTable As String = "TxDataTable"
Changes here txYear and txSearchMonth will be INTEGERS txSearchMonth int that reflects month of year
Steps for Process
Copy DB and Paste DB in another folder
Make Changes to Code that creates the DB
Make Changes in the DB manually with DB Browser
Uninstall the app and make new exe file with Inno Setup with new GUID
Create the new DB and delete the DB that is created then Paste the OLD DB in the new app version
I am sure I am overlooking something here so I guess the question is
Will this work ?
Is there a better way to accomplish this ?
Because this is a Check Book app I hate to loose the data.
What are the risks of this happening ?
|
|
|
|
|
My suggestion would be to write a converter. Create a new database with a similar table but all the data items stored as the correct types: INT for numbers, TEXT for strigs, and you could even use the DATE type for dates (See Date And Time Functions[^]).
The converter application would then read all the records of the old database, convert their content to the correct data types, and write the new records to a new database. You then run your modified app against the new database and reconcile the details against the old one.
|
|
|
|
|
After discovering I can not change the DB schema with DB Browser
Your suggestion of writing a converter is the only option
Thanks for the link about Date & Time Function
Wonder if anyone has written a Open Source SQLite DB Converter time to search
|
|
|
|
|
It's only a few lines of code:
- read next record
- convert data types
- write new record
|
|
|
|
|
I got most of it completed with DB Browser I posted my procedure It did not show as an Answer Thanks
|
|
|
|
|
Your "Steps for Process" isn't clear on every single step, and frankly, seems like you don't understand exactly what is going on at each step, especially the last one.
I'm sorry to say it, but your entire script is screaming "data loss!"
Also, there is no reason to start your column names with some abbreviation of their type, called "Hungarian Notation."
|
|
|
|
|
Make Changes in the DB manually with DB Browser This was perhaps the simplest solution for me
I did not want to learn all the code to put these commands behind a button click procedure
DB Browse has a tab labeled Execute SQL so my first task was to create a new Column in the DB Table
ALTER TABLE TxData ADD NxData INTEGER
Where TxData is the TABLE name and NxData is a new column with INTEGER type data. I hope
Next I needed to write the values in the old column to the new colum
UPDATE TxData SET NxData = txSearchMonth
OK Now we still have a column txSearchMonth that is referenced in the SQLite searches in the application
Because this column was created as a column with TEXT it needs to be deleted
It was causing errors in my SQLite Searches
ALTER TABLE TxData DROP COLUMN txSearchMonth
One last step I have not implemented that will save me from rewriting code in the searches is to RE-Name
the NxData column to txSearchMonth
Any one who wants to share a little code to use these commands with a button click feel free I am all EYE's
|
|
|
|
|
That is one of the most dangerous processes I have ever seen. Modifying your live data base in place and even dropping columns is something I would never dream of.
Also in the following statement:
UPDATE TxData SET NxData = txSearchMonth
You need to check that the NxData column has actually been converted from TEXT to INTEGER , because SQLite is quite happy storing text in integer fields: see Datatypes In SQLite[^].
|
|
|
|
|
Richard I agree Modifying live data was way too scary. So I wrote a TEST app with data that did not matter
Checking that NxData column is TEXT or INTEGER is on the agenda for today
I am not sure how to do that. I guess select the value in the column and see if it is equal to a know INTEGER
As for why I went down this route I was told because my TEXT value in the txSearchMonth was text the search I had written was failing. It was suggested I would need to rewrite the app. This was a DB design issue on my part that I am sure will not happen again! Your feedback is valued as I know you have a number of years as a professional
developer It is too cold for my other hobby woodworking so back to playing programmer and shoveling my Arizona snow
|
|
|
|
|
I did actuall test that earlier, and it seems to be OK. So if you enter "23" for a field that is declared as INTEGER type, SQLite will convert it to an integer. The only issue arises if the text is not a pure integer. The link I gave you above does explain how SQLite treats different data types, and is worth reading.
Choroid wrote: shoveling my Arizona snow I thought it was hot in the southern USA. I live 17 degrees further north and it's only cool here.
|
|
|
|
|
It is the 7000 ft elevation that does the trick
|
|
|
|
|
I used to travel to Colorado regularly and recall seeing snow at the top of Mount Evans in June.
|
|
|
|
|
WOW I would spend my summer in Idaho Springs, Colorado my friend owed the Clear Creek Pharmacy
also would fly out from Ohio in the winter to ski
YES snow in June I had a company car so started driving up Mt Evans the Chevy Impala not so good in 4 in of snow
They renamed Mt. Evans to Mount Blue Sky whole other story
Not so sure I like trying to changing History because it was offensive
Learn from the offenses and don't repeat them guess I am not Woke ha ha
|
|
|
|
|
I didn't get to Idaho Springs, but my two favourite towns were Old Colorado in Colorado Springs, and Estes Park. I worked in the UK, but corporate HQ was in Louisville, CO, so it was great to be sent out there at the company's cost; sometimes more than once in a year.
|
|
|
|
|
Richard MacCutchan wrote: dangerous processes I have ever seen.
I was working at a company with about 300 employees.
DBA seemed like a nice guy.
One day I asked him where he was checking his SQL (stored procs) into source control.
He had no idea what source control was.
I then asked where he was doing his work day to day.
On the production database...
|
|
|
|