link table from sqllite (1 Viewer)

zezo2021

Member
Local time
Tomorrow, 00:27
Joined
Mar 25, 2021
Messages
381
try to link the table from sqllite but an error appears near linked

Code:
Private Sub Command0_Click()
Dim connection As New ADODB.connection
Dim rst As New ADODB.Recordset

' Set the connection string
connection.ConnectionString = "DRIVER={SQLite3 ODBC Driver};DATABASE=e:\mydb.db"

' Open the connection
connection.Open

' Create a linked table in the Access database
rst.Open "CREATE LINKED TABLE Client TO [ODBC;DRIVER={SQLite3 ODBC Driver};DATABASE=C:\mydb.db].[Client]", connection

' Close the connection
connection.Close

End Sub
 

theDBguy

I’m here to help
Staff member
Local time
Today, 15:27
Joined
Oct 29, 2018
Messages
21,474
What was the error message?
 

Ranman256

Well-known member
Local time
Today, 18:27
Joined
Apr 9, 2015
Messages
4,337
did u try linking the table via the EXTERNAL DATA?
(not in code)
 

zezo2021

Member
Local time
Tomorrow, 00:27
Joined
Mar 25, 2021
Messages
381

Attachments

  • Screenshot 2023-10-02 204012.png
    Screenshot 2023-10-02 204012.png
    4.1 KB · Views: 48

CJ_London

Super Moderator
Staff member
Local time
Today, 23:27
Joined
Feb 19, 2013
Messages
16,616
CREATE LINKED TABLE
pretty sure that is not valid sql. You are also using ADO whilst access uses DAO.

do you have any video?

I don't have resources link access with SQLite
try experimenting

go to the External Data tab
click on odbc database
click on the link to datasource option
try navigating to the file data source, and select the DSN
or click on the machine datasource and choose your driver

in any event you will have to have installed your sqllite driver
 

zezo2021

Member
Local time
Tomorrow, 00:27
Joined
Mar 25, 2021
Messages
381
pretty sure that is not valid sql. You are also using ADO whilst access uses DAO.


try experimenting

go to the External Data tab
click on odbc database
click on the link to datasource option
try navigating to the file data source, and select the DSN
or click on the machine datasource and choose your driver

in any event you will have to have installed your sqllite driver
 

Attachments

  • error.png
    error.png
    4.3 KB · Views: 45

CJ_London

Super Moderator
Staff member
Local time
Today, 23:27
Joined
Feb 19, 2013
Messages
16,616
I've no idea what you were doing when you generated that message, so cannot offer any insight.

After 300+ posts, you will know we need detail to provide assistance. if you can't be bothered to provide that, why do you think we should spend multiple posts guessing?

A simple google search found this link

 

zezo2021

Member
Local time
Tomorrow, 00:27
Joined
Mar 25, 2021
Messages
381
here is all steps in a video
 

Attachments

  • Untitled Project.zip
    1.1 MB · Views: 55

zezo2021

Member
Local time
Tomorrow, 00:27
Joined
Mar 25, 2021
Messages
381
I've no idea what you were doing when you generated that message, so cannot offer any insight.

After 300+ posts, you will know we need detail to provide assistance. if you can't be bothered to provide that, why do you think we should spend multiple posts guessing?

A simple google search found this link


I saw this link before posting my post

not give me any solution
 

CJ_London

Super Moderator
Staff member
Local time
Today, 23:27
Joined
Feb 19, 2013
Messages
16,616
what don't you understand about it?
 

CJ_London

Super Moderator
Staff member
Local time
Today, 23:27
Joined
Feb 19, 2013
Messages
16,616
the quality of your video is too poor for me to see what you are doing.

Good luck with your app but I don't believe I can help with your quest
 

AccessBlaster

Registered User.
Local time
Today, 15:27
Joined
May 22, 2010
Messages
5,953
Not an expert, but around 0:00:12 seconds into your video you may need to "browse" to the backend location.
 

Users who are viewing this thread

Top Bottom