473,395 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Asp using Vb script not working with access database

Hello everyone

i have a problem with my db connection i paste code below please check anyone where i am wrong its very urgent please any one help me!!!!!
and i am working offline using local iis server just check

Thanks
Ravi kale


<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/ravi.asp" -->
<%
Dim raj
Dim raj_numRows
'Dim recordset

Set raj = Server.CreateObject("ADODB.Recordset")
raj.Activeconnection = MM_ravi_STRING
raj.Source = "SELECT * FROM employee"
raj.CursorType = 0
raj.CursorLocation = 2
raj.LockType = 1
raj.Open()
raj_numRows = 0
%>

<script language="VBScript" type="text/VBScript">
set.cnn = Server.CreateObject("ADODB.Connection")
open.connection
cnn.open("Driver={MicrosoftAccessDriver(*.mdb)};DB Q=D:\trupti.mdb;Uid=sa;Pwd=sa;")
"Driver = {MicrosoftAccessDriver(*.mdb)};DBQ=D:\trupti.mdb;U id=sa;Pwd=sa;"
open.recordset
set rs = server.CreateObject("ADODB.Recordset")
strSQL= "select * from employee"
rs.open strSQL,cnn,3,2
insert into employee('First_name','Last_name','Telephone','Ema il','Comment')
values("&txtfirst_name.txt&","&txtlast_name.txt&", "&txttelephone.number&","&txtEmail.memo&","&txtCom ment.txt&")
if NOT rs.eof Then
while NOT rs.EOF
rs.movenext
wend
end if

</script>
<html>
<head>
<Body>
<FORM action="test.asp"FORM METHOD="post" name=test.asp Actionvar=add">

<p>First_name
<INPUT TYPE="text" NAME="First_name">
<BR>
Last_name
<INPUT TYPE="text" NAME="Last_name">
<BR>
Telephone
<INPUT TYPE="text" NAME="Telephone">
<BR>
Email
<INPUT TYPE="text" NAME="Email">
<BR>
Comment
<INPUT TYPE="text" NAME="Comment">
<BR>
<INPUT name="add" TYPE="submit" id="insert" VALUE="Insert">
</p>
</FORM>
</html>
</head>
</Body>

<%
raj.Close()
Set raj = Nothing
%>
May 16 '07 #1
1 1734
JackT
1
I have found answers to almost every connection string problem I have ever had at http://www.connectionstrings.com/
May 16 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Bobby | last post by:
Hello everyone I have a question. The school I am working for is in the beginning process of having a webpage that will direct students to download there homework and be able to view there info...
4
by: chris.dunigan | last post by:
I'm looking for an example of how to execute an existing DTS­ package from an ASP (VB)script and would appreciate any and all response. ­I don't even know if it's possible Thanks - Chuck...
2
by: Nasir Wasim | last post by:
How can Access DIV Properties in Script while using Netscape 7.2. I want to use the div id with it's Visibility and left propertyin script but it's not working :-( Main File : ----------- ...
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
3
by: Martin | last post by:
I'm having trouble getting a new PHP/MySQl installation to work. Windows XP Pro, IIS 5.1, PHP 5.1.1, MySQL 5.0.16, ISAPI This is a new computer. The whole setup is for development use only -...
13
by: Marvin Zhang | last post by:
Hi, I'm not familiar with web programming, but I have a problem here. I have a page. When a user click one button on it, I will use AJAX to request a PHP script which will do a bunch of tasks,...
2
by: larry | last post by:
I am working on a DB for family data, and in this application the data spans variable amount of rows in multiple tables (one for the adults data, one for "family", one for the kids, another for...
3
by: DSSMaster | last post by:
I am trying to use windows scheduler to compact a database. In the task run line I have the following: "C:\Program Files\Microsoft Office\OFFICE11 MSACCESS.EXE" _ "C:\Files\Access\Sacroc.mdb"...
0
by: vozzek | last post by:
Hi all, I've got a mySQL database I've been working with as my localhost for several months now, no connection problems. I'm at the point however, where I need to connect to the database from...
7
by: JDOMPer | last post by:
Don’t misunderstand me – I use AJAX, but I think there is a far simpler, elegant alternative that just uses Javascript, the DOM and Php ( hence - JDOMP) for data transfers, and is cross-browser...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.