Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!
If FileUpload1.HasFile Then strExt = Right(FileUpload1.FileName, (Len(FileUpload1.FileName) - InStrRev(FileUpload1.FileName, ".")) + 1) If strExt = ".xls" Or strExt = ".xlsx" Then Dim strLocalPath As String strLocalPath = DLookUp("ParamValue", "tblSysParam", "ParamName = 'TempFileDir'") txtPath.Text = strLocalPath strFileName = ExactTimeString() & strExt txtFile.Text = strFileName FileUpload1.SaveAs(strLocalPath & strFileName) If strExt = ".xls" Then strC = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source='" & strLocalPath & strFileName & "';Extended Properties=Excel 8.0" ElseIf strExt = ".xlsx" Then strC = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & strLocalPath & strFileName & "';Extended Properties=Excel 12.0" End If txtConn.Text = strC Else DisplayAlert("File of type " & strExt & " not permitted only .xls or .xlsx maybe uploaded.", Me.Page) CleanUp() Reset() Exit Try End If Else DisplayAlert("No sample information detected.\n\nIf you believe this to be an error please contact your system administrator.", Me.Page) CleanUp() Reset() Exit Try End If myConnection.ConnectionString = strC myConnection.Open()
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.