Archive

Archive for the ‘MS SQL Server’ Category

Aug
19

You have two options when exporting your MySQL database. You can either export the entire database, or export selected tables of a database, to a file.

To Export the Complete Database



  1. Log in to your Account Manager.
  2. In the My Products section, select Hosting.
  3. Next to the hosting account you want to modify, click Manage Account.
  4. In the Databases section of the Hosting Control Center, click the icon for the type of database you want to manage. On this page, you can create new databases, delete databases, make changes to existing databases, or export databases.

  5. To access more advanced management functions, click Open Manager next to the database you want to export.
  6. Enter your username and password for your database.
  7. On the phpMyAdmin page, click Export under MySQL.
  8. In the Export field on the left side of the View Dump pane, select the database you would like to export.
  9. Select your options in the SQL options pane. Click the Save as file checkbox and name the file.

  10. When you are satisfied with your options, click the Go button. Your exported data displays.
  11. Click Select All and paste it into a SQL file.

Your database has been exported.


To Export Selected Tables Within a Database



  1. Log in to your Account Manager.
  2. In the My Products section, select Hosting.

  3. Next to the hosting account you want to modify, click Manage Account.
  4. In the Databases section of the Hosting Control Center, click the icon for the type of database you want to manage. On this page, you can create new databases, delete databases, make changes to existing databases, or export databases.
  5. To access more advanced management functions, click Open Manager next to the database you want to export.
  6. Enter your username and password for your database.
  7. Click on the Databases icon under MySQL.
  8. Click the database name you want to export tables from.

  9. Click the Export tab.
  10. In the Export field on the left side of the View Dump pane, select the tables you would like to export. Use the CTRL-key to select multiple tables.
  11. Select your options in the SQL options pane. Click the Save as file checkbox and name the file.
  12. When you are satisfied with your options, click the Go button. Your exported data displays.

  13. Click Select All and paste it into a SQL file.

The selected tables have been exported.

Jul
07

This example describes using File DSN and ASP/ADO to connect to a MySQL Database. 

<%
Dim oConn, oRs
Dim qry, connectstr, sDSNDir
Dim db_name, db_username, db_userpassword
Dim db_server, dsn_name

dsn_name = “your_dsn_name”
fieldname = “your_fieldname”
tablename = “your_tablename”

sDSNDir = Server.MapPath(“_dsn”)

connectstr = “filedsn=” & sDSNDir & “” & dsn_name

Set oConn = Server.CreateObject(“ADODB.Connection”)
oConn.Open connectstr
qry = “SELECT * FROM ” & tablename

Set oRS = oConn.Execute(qry)

if not oRS.EOF then
while not oRS.EOF
response.write ucase(fieldname) & “: ” & oRs.Fields(fieldname) & ”

oRS.movenext
wend
oRS.close
end if

Set oRs = nothing
Set oConn = nothing

%>