28
Feb/080
Feb/080
Conexões com os banco mais usados em ASP
-
<%'ACCESS - ODBC
-
Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\pasta\banco.mdb;Uid=Admin;Pwd=;
-
-
'-----------------------------------------------------------------------
-
'-----------------------------------------------------------------------
-
-
'Access 2007 - ACE OLEDB 12.0
-
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\pasta\banco.accdb;Persist Security Info=False;
-
-
'-----------------------------------------------------------------------
-
'-----------------------------------------------------------------------
-
-
'MySQL - ODBC
-
Driver={mySQL};Server=localhost;Option=16834;Database=Nome_Base;
-
-
'ou
-
Driver=MySQL ODBC 3.51 Driver;DataBase=Nome_Base;Server=localhost;Uid=;PassWord=;
-
-
'-----------------------------------------------------------------------
-
'-----------------------------------------------------------------------
-
-
'Oracle
-
Driver={Microsoft ODBC for Oracle};Server=localhost;Uid=;Pwd=;
-
-
'ou versão old
-
Driver={Microsoft ODBC Driver for Oracle};ConnectString=OracleServer.world;Uid=myUsername;Pwd=myPassword;
-
-
'-----------------------------------------------------------------------
-
'-----------------------------------------------------------------------
-
-
'SQL Server - ODBC
-
Driver={SQL Server};Server=localhost;Database=Nome_Base;Uid=;Pwd=;
-
-
'-----------------------------------------------------------------------
-
'-----------------------------------------------------------------------
-
-
'Postgre SQL
-
-
'Standard
-
Driver={PostgreSQL};Server=localhost;Port=5432;Database=Nome_Base;Uid=;Pwd=;
-
-
'ANSI
-
Driver={PostgreSQL ANSI};Server=localhost;Port=5432;Database=Nome_Base;Uid=;Pwd=;
-
-
'-----------------------------------------------------------------------
-
'-----------------------------------------------------------------------
-
-
'Firebird - ODBC - IBPhoenix Open Source
-
Driver=Firebird/InterBase(r) driver;Uid=;Pwd=;DbName=D:\FIREBIRD\banco\banco.fdb;%>
Dica: Acesse também: Webly
22
Feb/083
Feb/083
Registros Aleatórios no Access, SQL Server e MySQL
Registro aleatório no Access:
SELECT * FROM tabela order by Rnd(Int(Now()*[ID])-Now()*[ID]);
ID é o campo de indentificação de sua tabela.
Registro aleatório no MySQL:
SELECT * FROM tabela order by RAND();
Registro aleatório no SQL Server:
SELECT * FROM tabela order by NEWID();
Página 1 de 11


