Across The Network

  • Thread starter Thread starter Douglas J. Steele
  • Start date Start date
D

Douglas J. Steele

As long as there's a valid linked table, it shouldn't matter whether it's on
a different computer.

Are you running into a problem? If so, what is it?
 
DS said:
This works fine if table2 is located on the same computer.
This is a front end, with 2 back ends that are linked together.
But what happens, or how is it coded if table2 is on a different computer?

Dim TestSQL As String
DoCmd.SetWarnings False
TestSQL = "UPDATE table1 " & _
"SET table1.IDName = ""New1"" " & _
"WHERE table1.IDNumber = 1 ;"
DoCmd.RunSQL (TestSQL)

'On same computer....but wht if it's a different computer?
Dim Test2SQL As String
DoCmd.SetWarnings False
Test2SQL = "UPDATE table2 " & _
"SET table2.IDName = ""New2"" " & _
"WHERE table2.IDNumber = 1 ;"
DoCmd.RunSQL (Test2SQL)

DoCmd.SetWarnings True


With that approach, you can use the IN phrase in the FROM
clause:
"UPDATE table2 IN ""\\sharename\path\file.mdb"" " &
 
This works fine if table2 is located on the same computer.
This is a front end, with 2 back ends that are linked together.
But what happens, or how is it coded if table2 is on a different computer?

Thanks
DS


Dim TestSQL As String
DoCmd.SetWarnings False
TestSQL = "UPDATE table1 " & _
"SET table1.IDName = ""New1"" " & _
"WHERE table1.IDNumber = 1 ;"
DoCmd.RunSQL (TestSQL)

'On same computer....but wht if it's a different computer?
Dim Test2SQL As String
DoCmd.SetWarnings False
Test2SQL = "UPDATE table2 " & _
"SET table2.IDName = ""New2"" " & _
"WHERE table2.IDNumber = 1 ;"
DoCmd.RunSQL (Test2SQL)

DoCmd.SetWarnings True
 
DS said:
Thanks MArshall,
So it would be...

Dim Test2SQL As String
DoCmd.SetWarnings False
Test2SQL = "UPDATE table2 IN ""\\Backoffice\C:\DB\Data.mdb"" " & _
"SET table2.IDName = ""New2"" " & _
"WHERE table2.IDNumber = 1 ;"
DoCmd.RunSQL (Test2SQL)

Another option is

Dim Test2SQL As String
DoCmd.SetWarnings False
Test2SQL = "UPDATE [;database=\\Backoffice\C:\DB\Data.mdb].table2 " & _
"SET table2.IDName = ""New2"" " & _
"WHERE table2.IDNumber = 1 ;"
DoCmd.RunSQL (Test2SQL)

In either case, no linked table would be required in the front-end.
 
Douglas said:
As long as there's a valid linked table, it shouldn't matter whether it's on
a different computer.

Are you running into a problem? If so, what is it?
No problem yet, I'm just trying to get a grip on this linking and
network thing. It's a little confusing at this point!
Thanks
DS
 
Marshall said:
DS wrote:





With that approach, you can use the IN phrase in the FROM
clause:
"UPDATE table2 IN ""\\sharename\path\file.mdb"" " &
Thanks MArshall,
So it would be...

Dim Test2SQL As String
DoCmd.SetWarnings False
Test2SQL = "UPDATE table2 IN ""\\Backoffice\C:\DB\Data.mdb"" " & _
"SET table2.IDName = ""New2"" " & _
"WHERE table2.IDNumber = 1 ;"
DoCmd.RunSQL (Test2SQL)
 
DS said:
Thanks MArshall,
So it would be...

Dim Test2SQL As String
DoCmd.SetWarnings False
Test2SQL = "UPDATE table2 IN ""\\Backoffice\C:\DB\Data.mdb"" " & _
"SET table2.IDName = ""New2"" " & _
"WHERE table2.IDNumber = 1 ;"
DoCmd.RunSQL (Test2SQL)


When you use a UNC shared folder, you wouldn't normally use
a drive letter. Check to make sure you have the correct
path.
 
Douglas said:
Thanks MArshall,
So it would be...

Dim Test2SQL As String
DoCmd.SetWarnings False
Test2SQL = "UPDATE table2 IN ""\\Backoffice\C:\DB\Data.mdb"" " & _
"SET table2.IDName = ""New2"" " & _
"WHERE table2.IDNumber = 1 ;"
DoCmd.RunSQL (Test2SQL)


Another option is

Dim Test2SQL As String
DoCmd.SetWarnings False
Test2SQL = "UPDATE [;database=\\Backoffice\C:\DB\Data.mdb].table2 " & _
"SET table2.IDName = ""New2"" " & _
"WHERE table2.IDNumber = 1 ;"
DoCmd.RunSQL (Test2SQL)

In either case, no linked table would be required in the front-end.
So that would be good. This way I would only have to link the main
backend and this would just happen as needed and not take up bandwidth.
Thanks
DS
 
Marshall said:
DS wrote:





When you use a UNC shared folder, you wouldn't normally use
a drive letter. Check to make sure you have the correct
path.
Thanks Marshall,
I think I have it now.
DS
 
Back
Top