Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 ASP FSO
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

DarkDrift
Junior Member

USA
126 Posts

Posted - 23 February 2005 :  18:25:38  Show Profile  Visit DarkDrift's Homepage  Send DarkDrift an AOL message
How do you do like
f.WriteLine(" "strConnString = "driver={MySQL ODBC 3.1.....
I need the quote before strConnString how do I do that in simple ASp VbScript

http://www.xcalliber.com - The Future of Boards

Podge
Support Moderator

Ireland
3775 Posts

Posted - 23 February 2005 :  19:43:37  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
Something like -

f.WriteLine(""strConnString = ""driver={MySQL ODBC 3.1.....

Try using this tool - http://www.neogodless.com/features/tools/HTML2ASP.asp

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

DarkDrift
Junior Member

USA
126 Posts

Posted - 23 February 2005 :  19:51:59  Show Profile  Visit DarkDrift's Homepage  Send DarkDrift an AOL message
Thanks a bunch!

I try this
f.writeline("%>" & VBCRLF)
and i get this error
Microsoft VBScript compilation error '800a0409'

Unterminated string constant

/_config/boards/board.asp, line 18

f.WriteLine("
-------------^


http://www.xcalliber.com - The Future of Boards

Edited by - DarkDrift on 23 February 2005 19:56:23
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 23 February 2005 :  20:03:58  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
To write out a script delimiter you would have to seperate the % & >

e.g. f.writeline("%" & ">" & VBCRLF)

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

DarkDrift
Junior Member

USA
126 Posts

Posted - 23 February 2005 :  20:10:57  Show Profile  Visit DarkDrift's Homepage  Send DarkDrift an AOL message
Right Thanks :)
it don't work... no error no nothing

http://www.xcalliber.com - The Future of Boards

Edited by - DarkDrift on 23 February 2005 20:14:10
Go to Top of Page

DarkDrift
Junior Member

USA
126 Posts

Posted - 23 February 2005 :  20:18:40  Show Profile  Visit DarkDrift's Homepage  Send DarkDrift an AOL message
I tried removing the vbcrlf and still nothing

http://www.xcalliber.com - The Future of Boards
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 24 February 2005 :  05:29:09  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
Can you paste your full code ?

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

DarkDrift
Junior Member

USA
126 Posts

Posted - 24 February 2005 :  09:28:57  Show Profile  Visit DarkDrift's Homepage  Send DarkDrift an AOL message
yes let me get it

http://www.xcalliber.com - The Future of Boards
Go to Top of Page

DarkDrift
Junior Member

USA
126 Posts

Posted - 24 February 2005 :  09:32:22  Show Profile  Visit DarkDrift's Homepage  Send DarkDrift an AOL message
Board.asp


<%
select case Request.Form("iservice")
			case "snitz"
				intUser = Request.Form("username")
				intDirectory = "c:\inetpub\wwwroot\"

				Dim objFSO
				Set objFSO = CreateObject("Scripting.FileSystemObject")
				objFSO.CreateFolder("" & intDirectory & "B_S_" & intUser & "")
				objFSO.CopyFolder "C:\Inetpub\wwwroot\_config\boards\snitz", "" & intDirectory & "B_S_" & intUser & ""
				 'declare our variables
				 Set objFSO = nothing
		
set fs=Server.CreateObject("Scripting.FileSystemObject") 
set f=fs.CreateTextFile("" & intDirectory & "B_S_" & intUser & "\db_connect.asp",true) 
'f.WriteLine("<" & "%")
f.WriteLine("strConnString = ""driver={MySQL ODBC 3.51 Driver};option=4;server=jotts1;user=" & Request.Form("username") & ";password=" & Request.Form("pass") & ";DATABASE=" & Request.Form("dbname") & ";""")
'f.WriteLine("%" & ">" & VBCRLF)
f.Close
set f=nothing
set fs=nothing

			case "phpbb"
				intUser = Request.Form("username")
				intDirectory = "c:\inetpub\wwwroot\"

				Set objFSO = CreateObject("Scripting.FileSystemObject")
				objFSO.CreateFolder("" & intDirectory & "B_" & intUser & "")
				objFSO.CopyFolder "C:\Inetpub\wwwroot\_config\boards\phpbb", "" & intDirectory & "B_P_" & intUser & ""
				 'declare our variables
				 Set objFSO = nothing
end select
%>

<form action="http://www.jottswebhosting.com/boards/confirm.asp" method="post" name="register1">

<input type="hidden" name="dbname" value="<%="" & Request.Form("dbname") & ""%>">
<input type="hidden" name="mid" value="<%="" & Request.Form("mid") & ""%>">
<input type="hidden" name="username" value="<%="" & Request.Form("username") & ""%>">
<input type="hidden" name="pass" value="<%="" & Request.Form("pass") & ""%>">
<input type="hidden" name="iservice" value="<%="" & Request.Form("iservice") & ""%>">
<input type="hidden" name="site" value="<%="" & Request.Form("site") & ""%>">
</form>
  <script language="JavaScript"><!--

setTimeout('document.register1.submit()',1000);
//--></script>


The FSO part that is having troubles is


set fs=Server.CreateObject("Scripting.FileSystemObject") 
set f=fs.CreateTextFile("" & intDirectory & "B_S_" & intUser & "\db_connect.asp",true) 
'f.WriteLine("<" & "%" & VBCRLF)
f.WriteLine("strConnString = ""driver={MySQL ODBC 3.51 Driver};option=4;server=jotts1;user=" & Request.Form("username") & ";password=" & Request.Form("pass") & ";DATABASE=" & Request.Form("dbname") & ";""")
'f.WriteLine("%" & ">" & VBCRLF)
f.Close
set f=nothing
set fs=nothing


My config.asp was modified to this:


'strDBType = "sqlserver"
'strDBType = "access"
strDBType = "mysql"

'## Make sure to uncomment one of the strConnString lines and edit it so that it points to where your database is!
'strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("snitz_forums_2000.mdb") '## MS Access 2000 using virtual path
'strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/USERNAME/db/snitz_forums_2000.mdb") '## MS Access 2000 on Brinkster
'strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\inetpub\dbroot\snitz_forums_2000.mdb" '## MS Access 2000
'strConnString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("snitz_forums_2000.mdb") '## MS Access 97 using virtual path
'strConnString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("/USERNAME/db/snitz_forums_2000.mdb") '## MS Access 97 on Brinkster
'strConnString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=c:\inetpub\dbroot\snitz_forums_2000.mdb" '## MS Access 97
'strConnString = "Provider=SQLOLEDB;Data Source=SERVER_NAME;database=DB_NAME;uid=UID;pwd=PWD;" '## MS SQL Server 6.x/7.x/2000 (OLEDB connection)
'strConnString = "driver={SQL Server};server=SERVER_NAME;uid=UID;pwd=PWD;database=DB_NAME" '## MS SQL Server 6.x/7.x/2000 (ODBC connection)
'strConnString = "driver=MySQL;server=SERVER_IP;uid=UID;pwd=PWD;database=DB_NAME" '## MySQL w/ MyODBC v2.50
%>
<!--#INCLUDE File="./db_connect.asp" -->
<%
'strConnString = "DSN_NAME" '## DSN


Thanks for all of the help Podge!
Everything works fine except it will NOT write the <% and the %>... Thanks for all of the help Podge


http://www.xcalliber.com - The Future of Boards

Edited by - DarkDrift on 24 February 2005 09:35:11
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 24 February 2005 :  10:15:31  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
I'm at work at the moment, I'll see if I can get something together later.

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

DarkDrift
Junior Member

USA
126 Posts

Posted - 24 February 2005 :  10:23:06  Show Profile  Visit DarkDrift's Homepage  Send DarkDrift an AOL message
Thanks :)

http://www.xcalliber.com - The Future of Boards
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 24 February 2005 :  15:30:20  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
It works for me (although I didn't create the directory structure you have)

The only thing I can see that might cause a problem is the paths not being correct.
Can you enable server side script debugging and see if it throws up anything?

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

DarkDrift
Junior Member

USA
126 Posts

Posted - 24 February 2005 :  16:29:39  Show Profile  Visit DarkDrift's Homepage  Send DarkDrift an AOL message
how?

http://www.xcalliber.com - The Future of Boards
Go to Top of Page

DarkDrift
Junior Member

USA
126 Posts

Posted - 24 February 2005 :  16:31:41  Show Profile  Visit DarkDrift's Homepage  Send DarkDrift an AOL message
I can access the setup page.... here look goto http://69.243.62.26 and goto register fill out the stuff and goto snitz.. then when it's all done goto http://www.jottswebhosting.com:81/**USERNAME** it is not pretty yet and the name is incorrect so it's just demo.. What i do with the FSO is I copy the snitz folder to a folder named B for board_S for snitz_UERNAME and create a file called DB_connect.. I have Remote Desktop if you are puzzled... Thanks for all and any help

If the ip don't work try www.boardspring.com

http://www.xcalliber.com - The Future of Boards

Edited by - DarkDrift on 24 February 2005 16:35:00
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 24 February 2005 :  17:01:30  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
I know what you're try to achieve. It all worked apart from when it tried to confirm - http://www.jottswebhosting.com/boards/confirm.asp

I got a 404 not found error.


This code worked for me (I did change the paths)

set fs=Server.CreateObject("Scripting.FileSystemObject") 
set f=fs.CreateTextFile("" & intDirectory & "B_S_" & intUser & "\db_connect.asp",true) 
f.WriteLine("<" & "%" & VBCRLF)
f.WriteLine("strConnString = ""driver={MySQL ODBC 3.51 Driver};option=4;server=jotts1;user=" & Request.Form("username") & ";password=" & Request.Form("pass") & ";DATABASE=" & Request.Form("dbname") & ";""")
f.WriteLine("%" & ">" & VBCRLF)
f.Close
set f=nothing
set fs=nothing


It created a file db_connect.asp with delimiters and connection string.
Your error must be elsewhere if the paths are correct.

To enable server side debugging open Internet Services Manager (IIS)
Navigate to your website
Right click it and select properties
Click "configuration"
Click "Debugging tab"
Enable one of the "debugging flags" at the top.

When an error occurs you should be notified. If you're not, try
including "on error goto 0" before any suspect code.

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

DarkDrift
Junior Member

USA
126 Posts

Posted - 24 February 2005 :  17:16:54  Show Profile  Visit DarkDrift's Homepage  Send DarkDrift an AOL message
Thanks let me try it

http://www.xcalliber.com - The Future of Boards
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.21 seconds. Powered By: Snitz Forums 2000 Version 3.4.07