Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to save to a filename
Message
From
08/12/2006 01:06:42
 
 
To
08/12/2006 01:01:06
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MySQL
Miscellaneous
Thread ID:
01175949
Message ID:
01175965
Views:
6
>thanks for reply, yes i want to generate the filename dynamically.
>
>Dim Lc_mod as string
>Dim Lc_doc as String
>Dim Lc_date as String
>
>Lc_mod = "GRP"
>Lc_doc = .textbox1.text
>Lc_dte = date()
>
>Lc_xmlfile = ?
>
>then how can i create the filename like this "GRP_2_061208.xml" and saving it as xml file like this --
>
>result.Save("GRP_2_061208.xml")
>
>or
>
>result.Save(&Lc_xmlfile)

Add a declaration for the file name and for a date value:
Dim lcFileName As String = ""
Dim ldDate As Date = Date.Now
Populate the value:
lcFileName = Lc_mod + "_" + Trim(.textbox1.text) + "_" + ldDate.Day.ToString.PadLeft(2 , "0") + _
 ldDate.Month.ToString.PadLeft(2 , "0") + "_" + ldDate.Year.ToString + ".xml"
Save the file:
result.Save(lcFileName)
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform