Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database Problem. I don't see any problem... You?

Status
Not open for further replies.

JuanjoZun

Programmer
Jul 20, 2002
82
MX
Hello people!

I have a problem with a database... I want to clear all data in a table... I wrote this ASP but the records don't clear... The database is in a network machine... I don't think this would be a problem. The Table has two records, a numeric id and a Memo SQLTxt . The most Larger Memo type, has 290 characters aprox... The table's name is StrIns.

So, If someone can see a problem or has a better idea, please help me. Ah! and It doesn't appear any error..

Thanks.

<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME=&quot;GENERATOR&quot; Content=&quot;Microsoft Visual Studio 6.0&quot;>
</HEAD>
<BODY>
<%
Dim Conn2
Dim rs_delete
Dim Sqltxt

Set Conn2 = Server.CreateObject(&quot;ADODB.Connection&quot;)
Conn2.Open &quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=//rcnet3/rcnet/monitoreo/monitor.mdb&quot; & &quot;;Persist Security Info=True&quot;
set rs_delete = server.CreateObject(&quot;ADODB.Recordset&quot;)
Sqltxt = &quot;Delete * from StrIns&quot;
Conn2.Execute (Sqltxt)
%>

</BODY>
</HTML>

Juanjo

Follow the dark side, so you can reach the light.
 
Set Conn2 = Server.CreateObject(&quot;ADODB.Connection&quot;)
Conn2.Open &quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\rcnet3\rcnet\monitoreo\monitor.mdb&quot;
Sqltxt = &quot;Delete * from StrIns&quot;
Conn2.Execute (Sqltxt)
Conn2.Close
Set Conn2 = Nothing
 
In case you didn't catch the key-but-tricky change there, you need to use backslashes instead of forward slashes in the path.
 
another tip, if you use Server.MapPath() the slashes are not important in respect to / or \. The function will reverse them accordingly as I've found.

I have yet to find this documented (although not tried) but have found it to be a perk if you will.

____________________________________________________
get the best answer to your questions by asking the best questions &quot;General FAQ&quot; faq333-2924
onpnt2.gif
 
Well, let me try this options... Thanks


Juanjo

Follow the dark side, so you can reach the light.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top