Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default connection to internet mysql-database

Hi

I established a connection to a database via "importing external data"
included in the excel-menu. Unfortunately, there's no such tool to write
data into a database. I just changed the sql-string an exept from an
error, the data is written into it. But I'v read that I can connect to a
database through proper vba-code. Can someone tell me if I have to link
other objects, which objects I have to declare a how I have to handle
them exactly.

thx a lot, if someone could give me a quite detailed response.

greez
masterphilch
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default connection to internet mysql-database

Hi,

I know the code for a access database. I don't know if these is the same
code for a sql database. I don't have sql server on my computer.

"masterphilch" a écrit dans le message de news:
...
Hi

I established a connection to a database via "importing external data"
included in the excel-menu. Unfortunately, there's no such tool to write
data into a database. I just changed the sql-string an exept from an
error, the data is written into it. But I'v read that I can connect to a
database through proper vba-code. Can someone tell me if I have to link
other objects, which objects I have to declare a how I have to handle them
exactly.

thx a lot, if someone could give me a quite detailed response.

greez
masterphilch



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default connection to internet mysql-database

Hi

I saw some connection-codes for access-databases, but they seem to be a
little different. Your code perhaps helps me to solve my problem.

labc wrote:
Hi,

I know the code for a access database. I don't know if these is the same
code for a sql database. I don't have sql server on my computer.

"masterphilch" a écrit dans le message de news:
...

Hi

I established a connection to a database via "importing external data"
included in the excel-menu. Unfortunately, there's no such tool to write
data into a database. I just changed the sql-string an exept from an
error, the data is written into it. But I'v read that I can connect to a
database through proper vba-code. Can someone tell me if I have to link
other objects, which objects I have to declare a how I have to handle them
exactly.

thx a lot, if someone could give me a quite detailed response.

greez
masterphilch




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default connection to internet mysql-database

Hi,
look here for a demo :

http://thelabwiz.home.mindspring.com/mysql.html

hth
Gys


"masterphilch" wrote in message
...
Hi

I established a connection to a database via "importing external data"
included in the excel-menu. Unfortunately, there's no such tool to write
data into a database. I just changed the sql-string an exept from an
error, the data is written into it. But I'v read that I can connect to a
database through proper vba-code. Can someone tell me if I have to link
other objects, which objects I have to declare a how I have to handle
them exactly.

thx a lot, if someone could give me a quite detailed response.

greez
masterphilch


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default connection to internet mysql-database

I found the solution by myself:

Sub test5()
Dim qt As QueryTable
Dim sqlstring As String
Dim connstring As String
sqlstring = "Select * From *"
connstring = _
"ODBC;DSN=name_of_the_driver(individual);DATABASE= name_of_the_database;SERVER=ip_or_url;UID=user;PAS SWORD=password"
With ActiveSheet.QueryTables.Add(Connection:=connstring , _
Destination:=Range("B1"), Sql:=sqlstring)
.Refresh
End With

End Sub


masterphilch wrote:
Hi

I established a connection to a database via "importing external data"
included in the excel-menu. Unfortunately, there's no such tool to write
data into a database. I just changed the sql-string an exept from an
error, the data is written into it. But I'v read that I can connect to a
database through proper vba-code. Can someone tell me if I have to link
other objects, which objects I have to declare a how I have to handle
them exactly.

thx a lot, if someone could give me a quite detailed response.

greez
masterphilch

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Internet connection stuenov Excel Discussion (Misc queries) 0 February 22nd 09 07:25 PM
Internet connection stuenov Excel Discussion (Misc queries) 0 February 18th 09 03:52 PM
Using Excel for MySQL database import inspireme Excel Discussion (Misc queries) 1 January 6th 06 10:59 PM
Internet Connection Web_Builder[_2_] Excel Programming 2 August 11th 04 01:07 AM
Internet connection? Francis Ang Excel Programming 3 May 31st 04 04:01 AM


All times are GMT +1. The time now is 09:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"