C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Insert a new row in the database using VBScript


Posted Date: 14 Apr 2008    Resource Type: Code Snippets    Category: VB.NET Syntax

Posted By: Abhishek Arya       Member Level: Diamond
Rating:     Points: 10



This code will give you the idea for saving the values in msacess database using the vb scripts.


<script language="VBScript">

Dim objRS, aConnectionString, DBObj

aConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\Documents and Settings\Administrator.VFI\My Documents\MyRequest.mdb"
Set DBObj=Server.CreateObject("ADODB.Connection")
DBObj.ConnectionString = aConnectionString
DBObj.Open
SQLQuery = "INSERT * FROM MyRequest1"
Set objRS=DBObj.Execute(SQLQuery)

objRS.AddNew
objRS.Fields("Requestor") = Request.Form("Requestor")
objRS.Fields("Department") = Request.Form("Department")
objRS.Fields("Date") = Request.Form("Date")
objRS.Fields("Deadline") = Request.Form("Deadline")
objRS.Fields("Status") = Request.Form("Status")
objRS.Fields("Particulars") = Request.Form("Particulars")
objRS.Fields("Comments") = Request.Form("Comments")
objRS.Update
objRS.Close
Set objRS = nothing
objConn.Close
Set objConn = nothing
</SCRIPT>









Responses

Author: M. Irfan    12 May 2008Member Level: Gold   Points : 2
Where is the code??
I am not seeing any code there..


Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: pagin in the datagrid.
Previous Resource: Type Safe dictionary
Return to Discussion Resource Index
Post New Resource
Category: VB.NET Syntax


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

doors in nj

Contact Us    Privacy Policy    Terms Of Use