6/17/2025 8:29:26 PM
|
|
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!
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.
|
|
|
|
Write in File
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 |
|
|
|
Re: Write in File
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? |
|
|
|
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!
|
|
|
|
|
|
|
|