How can I invoke the File System Dialog box

G

Guest

I am using the following code and it works fine. Instead of hard coding the
location for saving the file I will like to use the file dialog box in
windows. So that the user and give a name to the file and also select a
location to save it in. I then would like to grab the path and file name
information and use that to save the dataset.

PLS help I will be forever grateful.

Thanks

(e-mail address removed)



Dim strSQL As String

strSQL = "SELECT top 200 ID, STATUS,LAST_FIRST ,COMPANY FROM Name"

Dim strConn As String

strConn = "User ID=ss;pwd = 123;Initial Catalog=IMIS_PRODUCTION;Data
Source=NEITESTDB"

Dim sqlconn As New SqlConnection(strConn)

sqlconn.Open()

Dim sqlDA As New SqlDataAdapter(strSQL, sqlconn)
Dim objds As New DataSet()

sqlDA.Fill(objds, "dtnames")
objds.WriteXml("c:\imis_web_test.xls")
dg1.DataSource = objds.Tables.Item("dtnames")
'dg1.PagerStyle.NextPageText = "Next"
'dg1.PagerStyle.PrevPageText = "Previous"
dg1.DataBind()
sqlconn.Close()
 
L

Lucas Tam

I am using the following code and it works fine. Instead of hard
coding the location for saving the file I will like to use the file
dialog box in windows. So that the user and give a name to the file
and also select a location to save it in. I then would like to grab
the path and file name information and use that to save the dataset.

You'll need to write you own popup file dialog box. There is no way to pop
a server side file dialog on the client side.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top