Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, June 17, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Write in File
Ramses
Posts: 6
 
Write in FileYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 27 Mar 07 2:58 PM
fiogf49gjkf0d
Hi I want to create this script on SLX this code was created on VB6 can somebody help me to do it in SLX

Private Sub CrearODBC(ODBCName As String, ODBCRuta, BDRuta As String)
'>----
Dim NArch As Integer
'>----
NArch = FreeFile
'>----
Open ODBCRuta & "\" & ODBCName & ".DSN" For Output As #NArch ' open File to Outputs.
'>----
Print #NArch, "[ODBC]"
Print #NArch, "DRIVER=Driver do Microsoft Access (*.mdb)"
Print #NArch, "UID = admin"
Print #NArch, "UserCommitSync = Yes"
Print #NArch, "Threads = 3"
Print #NArch, "SafeTransactions = 0"
Print #NArch, "PageTimeout = 5"
Print #NArch, "MaxScanRows = 8"
Print #NArch, "MaxBufferSize = 2048"
Print #NArch, "FIL=MS Access"
Print #NArch, "DriverId = 25"
Print #NArch, "DefaultDir=" & BDRuta
Print #NArch, "DBQ=" & BDRuta & GT.M_BD
'>----
Close #NArch ' Close File.
'>----
End Sub
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Write in FileYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 27 Mar 07 3:40 PM
fiogf49gjkf0d
To Write to a text file in VBScript, you'll use the FileSystemObject (FSO). A google shearch will reval many examples of this.

It will be something like this:

Dim fso
Dim file

Set fso = CreateObject("Scripting.FileSystemObject")
Set file = fso.CreateTextFile("C:\MyFile.txt", True)
file.WriteLine("You can write lines using WriteLine")
file.Write ("Or you can just write - which means you need to add any line breaks yourself")
file.Close

Set file = Nothing
Set fso = Nothing


Make sense?
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 6/17/2025 8:46:53 PM