May 29, 2003 at 2:40 pm
Hi all,
Is it possible to use DTS to execute a remote web page that returns a recordset then dump that into a table...? I was initially using the PHP fopen() command on the URL but now the site has moved over to ASP and msSQL so looking for a way to simulate that behaviour.
Thanks for any help
Rolf
June 2, 2003 at 8:00 am
This was removed by the editor as SPAM
June 2, 2003 at 8:16 am
Hi Rolf,
after reading what php fopen() does, I think the FileSystemObject might be equivalent to it.
I'm not sure if this will work on a remote site, but you can use an ActiveX Script Task with this script. I've found this in MSDN
'**********************************************************************
' Visual Basic ActiveX Script
'************************************************************************
Function Main()
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
Dim fso, f, ts
Set fso = CreateObject("Scripting.FileSystemObject")
fso.CreateTextFile "test1.txt" ' Create a file.
Set f = fso.GetFile("test1.txt")
Set ts = f.OpenAsTextStream(ForWriting, TristateUseDefault)
ts.Write "Hello World"
ts.Close
Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
TextStreamTest = ts.ReadLine
ts.Close
End Function
Another way might be using the ShellExecute API function
void CLaunchIEDlg::OnOK()
{
CWnd::UpdateData(TRUE);
//LPCTSTR lpszPath = "C:\\PROGRAMME\\PLUS!\\MICROSOFT INTERNET\\Iexplore.exe ";
LPCTSTR lpszPath = "Iexplore";
LPCTSTR lpszSite = m_Site;
ShellExecute(NULL, "open", lpszPath, lpszSite, NULL, SW_SHOWNORMAL );
EndDialog(1);
return;
}
Sorry, only in C++. but ShellExecute is well documented and works also with VB.
HTH
Cheers,
Frank
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
June 2, 2003 at 8:19 am
Hi again Rolf,
BTW have you tried working with php on mssql server? I think php4 supports SQL7 and SQL2k
Cheers,
Frank
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
June 4, 2003 at 11:42 am
thanks for the replies...looking into an ActiveX script now.
Rolf
June 5, 2003 at 12:45 am
Hi Rolf,
I'm playing around at home with PHP and MySQL (mainly because PHP ISP's are much more cheaper than ASP ISP's) . I have seen in PHP4 several functions for MSSQL Server. Can't you use one of these functions?
Cheers,
Frank
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply