SlideShare une entreprise Scribd logo
1  sur  7
Conexao banco postgres ASP <%  	Set objConn = Server.CreateObject("ADODB.Connection") functionabreConexao() objConn.ConnectionString = "Driver={PostgreSQL ANSI};Server=localhost;Port=5432;Database=teste;Uid=postgres;Pwd=sql;" objConn.Open endfunction functionfechaConnexao() objConn.Close() endfunction %>
Include para conexao <!--#include file="conexao.asp"-->
Formulario de entrada(Montando Combobox) <tr> 	<td>     	Status     </td>  	<td>         <selectname="status" id="status">         <% abreConn() sql_status = "Select * fromstatus"             Set resultado = objConn.Execute(sql_status) whilenot resultado.eof response.Write("<optionvalue='"& resultado("idstatus") &"'>"& resultado("status”)&"</option>")                 resultado.movenext wend fechaConn()         %> 		</select>      </td>  </tr> <tr> 	<tdcolspan="2" align="center">         <input type="submit" name="salvar" id="salvar" value="Salvar" />         <input type="button" value="Voltar" onClick="document.location.href='index.asp'"/>     </td> </tr> </form>
Java script alert + redireciona %>         <script language="JavaScript" TYPE="text/javascript"> alert("Contato inserido com sucesso!"); location.href="INDEX.ASP"; 		</script>         <%
Recuperando dados na combobox <selectname="status" id="status"> <% sql_status= "Select * fromtb_status" Set rs2 = objConn.Execute(sql_status) whilenot rs2.eof ifrs2("idstatusfunc")<>idstatusthen response.Write("<optionvalue='"& rs2("idstatusfunc") &"'>"&rs2("statusfunc")&"</option>") else response.Write("<optionselectedvalue='"& rs2("idstatusfunc") &"'>"& rs2("statusfunc")&"</option>") endif rs2.movenext wend %> </select>
SQL INSERT ASP sql_insert="INSERT INTO pessoa (nome,endereco) VALUES('"&nome&"','"&endereco&"‘) objConn.Execute(sql_insert)
SQL UPDATE ASP sql_update="UPDATE  pessoa SET nome='"&nome&"',endereco='"&endereco&"', whereidpessoa="&idpesoa objConn.Execute(sql_update)

Contenu connexe

Tendances

Transakcyjność w django
Transakcyjność w djangoTransakcyjność w django
Transakcyjność w django
Marcin Baran
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
Pat Cito
 
Orsiso
OrsisoOrsiso
Orsiso
e27
 
VPN Access Runbook
VPN Access RunbookVPN Access Runbook
VPN Access Runbook
Taha Shakeel
 
Transaction Management Tool
Transaction Management ToolTransaction Management Tool
Transaction Management Tool
Peeyush Ranjan
 

Tendances (20)

Angular 2 Architecture
Angular 2 ArchitectureAngular 2 Architecture
Angular 2 Architecture
 
RSpec
RSpecRSpec
RSpec
 
Practical JavaScript Promises
Practical JavaScript PromisesPractical JavaScript Promises
Practical JavaScript Promises
 
Excellent
ExcellentExcellent
Excellent
 
NoSQL Injections in Node.js - The case of MongoDB
NoSQL Injections in Node.js - The case of MongoDBNoSQL Injections in Node.js - The case of MongoDB
NoSQL Injections in Node.js - The case of MongoDB
 
Rails is not just Ruby
Rails is not just RubyRails is not just Ruby
Rails is not just Ruby
 
React.js触ってみた 吉澤和香奈
React.js触ってみた 吉澤和香奈React.js触ってみた 吉澤和香奈
React.js触ってみた 吉澤和香奈
 
Transakcyjność w django
Transakcyjność w djangoTransakcyjność w django
Transakcyjność w django
 
Angular Performance: Then, Now and the Future. Todd Motto
Angular Performance: Then, Now and the Future. Todd MottoAngular Performance: Then, Now and the Future. Todd Motto
Angular Performance: Then, Now and the Future. Todd Motto
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
Workshop 12: AngularJS Parte I
Workshop 12: AngularJS Parte IWorkshop 12: AngularJS Parte I
Workshop 12: AngularJS Parte I
 
Orsiso
OrsisoOrsiso
Orsiso
 
AngularJS Architecture
AngularJS ArchitectureAngularJS Architecture
AngularJS Architecture
 
AngularJS Services
AngularJS ServicesAngularJS Services
AngularJS Services
 
VPN Access Runbook
VPN Access RunbookVPN Access Runbook
VPN Access Runbook
 
Transaction Management Tool
Transaction Management ToolTransaction Management Tool
Transaction Management Tool
 
Angular 1.x vs. Angular 2.x
Angular 1.x vs. Angular 2.xAngular 1.x vs. Angular 2.x
Angular 1.x vs. Angular 2.x
 
Javascript - Beyond-jQuery
Javascript - Beyond-jQueryJavascript - Beyond-jQuery
Javascript - Beyond-jQuery
 
Angularjs Performance
Angularjs PerformanceAngularjs Performance
Angularjs Performance
 
Postman On Steroids
Postman On SteroidsPostman On Steroids
Postman On Steroids
 

En vedette

LA TECNOLOGIA EN LA EDUCACION
LA TECNOLOGIA EN LA EDUCACIONLA TECNOLOGIA EN LA EDUCACION
LA TECNOLOGIA EN LA EDUCACION
felipe-morales
 
Presentación
PresentaciónPresentación
Presentación
exiredes
 
Hungria, Irlanda e Islandia
Hungria, Irlanda e Islandia Hungria, Irlanda e Islandia
Hungria, Irlanda e Islandia
Blanca Madrid
 
Paris salon du_chocolat
Paris salon du_chocolatParis salon du_chocolat
Paris salon du_chocolat
filipj2000
 
Secretos final fantasy ix by f fmaniacs
Secretos final fantasy ix by f fmaniacsSecretos final fantasy ix by f fmaniacs
Secretos final fantasy ix by f fmaniacs
Manuel García Serrano
 
3 bimestre
3 bimestre3 bimestre
3 bimestre
mtavo159
 
Manual de soporte a distancia
Manual de soporte a distanciaManual de soporte a distancia
Manual de soporte a distancia
geraibarra30
 
O traballo por proxectos en infantil, primaria e secundaria
O traballo por proxectos en infantil, primaria e secundariaO traballo por proxectos en infantil, primaria e secundaria
O traballo por proxectos en infantil, primaria e secundaria
María Valbuena
 
Presentación Juan Murgui
Presentación Juan MurguiPresentación Juan Murgui
Presentación Juan Murgui
Juan Murgui
 
Como crear documento en google docs
Como crear documento en google docsComo crear documento en google docs
Como crear documento en google docs
ILse VaLeria
 

En vedette (20)

LA TECNOLOGIA EN LA EDUCACION
LA TECNOLOGIA EN LA EDUCACIONLA TECNOLOGIA EN LA EDUCACION
LA TECNOLOGIA EN LA EDUCACION
 
Roar spansh version maria stefany montoya
Roar spansh version maria stefany montoyaRoar spansh version maria stefany montoya
Roar spansh version maria stefany montoya
 
lizbethzita
lizbethzitalizbethzita
lizbethzita
 
Presentación
PresentaciónPresentación
Presentación
 
Dignidad humana desde embrion
Dignidad humana desde embrionDignidad humana desde embrion
Dignidad humana desde embrion
 
Hungria, Irlanda e Islandia
Hungria, Irlanda e Islandia Hungria, Irlanda e Islandia
Hungria, Irlanda e Islandia
 
Feliz navidad 2013
Feliz navidad 2013Feliz navidad 2013
Feliz navidad 2013
 
Paris salon du_chocolat
Paris salon du_chocolatParis salon du_chocolat
Paris salon du_chocolat
 
Secretos final fantasy ix by f fmaniacs
Secretos final fantasy ix by f fmaniacsSecretos final fantasy ix by f fmaniacs
Secretos final fantasy ix by f fmaniacs
 
3 bimestre
3 bimestre3 bimestre
3 bimestre
 
Manual de soporte a distancia
Manual de soporte a distanciaManual de soporte a distancia
Manual de soporte a distancia
 
O traballo por proxectos en infantil, primaria e secundaria
O traballo por proxectos en infantil, primaria e secundariaO traballo por proxectos en infantil, primaria e secundaria
O traballo por proxectos en infantil, primaria e secundaria
 
Hardware jhonatan velasco 3
Hardware jhonatan velasco 3Hardware jhonatan velasco 3
Hardware jhonatan velasco 3
 
Presentación Juan Murgui
Presentación Juan MurguiPresentación Juan Murgui
Presentación Juan Murgui
 
Como crear documento en google docs
Como crear documento en google docsComo crear documento en google docs
Como crear documento en google docs
 
El comercio
El comercioEl comercio
El comercio
 
Info sacu
Info sacuInfo sacu
Info sacu
 
Revista de nutricion laura rocio
Revista de nutricion laura rocioRevista de nutricion laura rocio
Revista de nutricion laura rocio
 
St comandante episodio 6
St comandante episodio 6St comandante episodio 6
St comandante episodio 6
 
Filosofia
FilosofiaFilosofia
Filosofia
 

Similaire à Aspdevice - Asp Fast Crud introdution

30 5 Database Jdbc
30 5 Database Jdbc30 5 Database Jdbc
30 5 Database Jdbc
phanleson
 
Executing Sql Commands
Executing Sql CommandsExecuting Sql Commands
Executing Sql Commands
phanleson
 
Executing Sql Commands
Executing Sql CommandsExecuting Sql Commands
Executing Sql Commands
leminhvuong
 
Aspnet2 Overview
Aspnet2 OverviewAspnet2 Overview
Aspnet2 Overview
ajitbergi
 

Similaire à Aspdevice - Asp Fast Crud introdution (20)

Presentasi Kelompok 25 PW A+B
Presentasi Kelompok 25 PW A+BPresentasi Kelompok 25 PW A+B
Presentasi Kelompok 25 PW A+B
 
Tugas pw [kelompok 25]
Tugas pw [kelompok 25]Tugas pw [kelompok 25]
Tugas pw [kelompok 25]
 
My java file
My java fileMy java file
My java file
 
30 5 Database Jdbc
30 5 Database Jdbc30 5 Database Jdbc
30 5 Database Jdbc
 
Spring Capitulo 05
Spring Capitulo 05Spring Capitulo 05
Spring Capitulo 05
 
Data Access with JDBC
Data Access with JDBCData Access with JDBC
Data Access with JDBC
 
สปริงเฟรมเวิร์ค4.1
สปริงเฟรมเวิร์ค4.1สปริงเฟรมเวิร์ค4.1
สปริงเฟรมเวิร์ค4.1
 
ASP.NET MVC
ASP.NET MVCASP.NET MVC
ASP.NET MVC
 
Interoperable Web Services with JAX-WS
Interoperable Web Services with JAX-WSInteroperable Web Services with JAX-WS
Interoperable Web Services with JAX-WS
 
WCF 4.0
WCF 4.0WCF 4.0
WCF 4.0
 
Struts2
Struts2Struts2
Struts2
 
JDBC Tutorial
JDBC TutorialJDBC Tutorial
JDBC Tutorial
 
Introduction to Prototype JS Framework
Introduction to Prototype JS FrameworkIntroduction to Prototype JS Framework
Introduction to Prototype JS Framework
 
Executing Sql Commands
Executing Sql CommandsExecuting Sql Commands
Executing Sql Commands
 
Executing Sql Commands
Executing Sql CommandsExecuting Sql Commands
Executing Sql Commands
 
Introduction to AJAX and DWR
Introduction to AJAX and DWRIntroduction to AJAX and DWR
Introduction to AJAX and DWR
 
Scti 2011 minicurso jquery
Scti 2011 minicurso jqueryScti 2011 minicurso jquery
Scti 2011 minicurso jquery
 
Aspnet2 Overview
Aspnet2 OverviewAspnet2 Overview
Aspnet2 Overview
 
jdbc
jdbcjdbc
jdbc
 
AJAX Workshop Notes
AJAX Workshop NotesAJAX Workshop Notes
AJAX Workshop Notes
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Dernier (20)

Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 

Aspdevice - Asp Fast Crud introdution

  • 1. Conexao banco postgres ASP <% Set objConn = Server.CreateObject("ADODB.Connection") functionabreConexao() objConn.ConnectionString = "Driver={PostgreSQL ANSI};Server=localhost;Port=5432;Database=teste;Uid=postgres;Pwd=sql;" objConn.Open endfunction functionfechaConnexao() objConn.Close() endfunction %>
  • 2. Include para conexao <!--#include file="conexao.asp"-->
  • 3. Formulario de entrada(Montando Combobox) <tr> <td> Status </td> <td> <selectname="status" id="status"> <% abreConn() sql_status = "Select * fromstatus" Set resultado = objConn.Execute(sql_status) whilenot resultado.eof response.Write("<optionvalue='"& resultado("idstatus") &"'>"& resultado("status”)&"</option>") resultado.movenext wend fechaConn() %> </select> </td> </tr> <tr> <tdcolspan="2" align="center"> <input type="submit" name="salvar" id="salvar" value="Salvar" /> <input type="button" value="Voltar" onClick="document.location.href='index.asp'"/> </td> </tr> </form>
  • 4. Java script alert + redireciona %> <script language="JavaScript" TYPE="text/javascript"> alert("Contato inserido com sucesso!"); location.href="INDEX.ASP"; </script> <%
  • 5. Recuperando dados na combobox <selectname="status" id="status"> <% sql_status= "Select * fromtb_status" Set rs2 = objConn.Execute(sql_status) whilenot rs2.eof ifrs2("idstatusfunc")<>idstatusthen response.Write("<optionvalue='"& rs2("idstatusfunc") &"'>"&rs2("statusfunc")&"</option>") else response.Write("<optionselectedvalue='"& rs2("idstatusfunc") &"'>"& rs2("statusfunc")&"</option>") endif rs2.movenext wend %> </select>
  • 6. SQL INSERT ASP sql_insert="INSERT INTO pessoa (nome,endereco) VALUES('"&nome&"','"&endereco&"‘) objConn.Execute(sql_insert)
  • 7. SQL UPDATE ASP sql_update="UPDATE pessoa SET nome='"&nome&"',endereco='"&endereco&"', whereidpessoa="&idpesoa objConn.Execute(sql_update)