December 16, 1999

Open ODBC Connection Without Hardcoding Password

Question: In my ASP page, I open an ODBC connection with: Set Conn = Server.CreateObject(“ADODB.Connection”)Conn.CommandTimeout = 600Conn.open “Database_name”,”Username”,”password”. How can I avoid hardcoding the password in the ASP source? Answer: You have a few options. First, you could use a File DSN and include the ID and password inside the

Data Source Name Not Found Error ‘80004005’

Question: What does this error message mean? Microsoft OLE DB Provider for ODBC Drivers error ‘80004005’ [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified /SampleProject/default.asp, line 14 Here’s the code I created in Visual InterDev: :::: Answer: ASP is looking for a System DSN called

Overloading istream operator >> for bool

Question: I am trying to overload the istream operator >> to work with type “bool”. From my point of view the code looks okay, except the VC++ 6.0 compiler tells me: binary ‘>>’ : no operator defined which takes a right-hand operand of type ‘bool’ Here is my code snipet:

Cross Platform Compilers

Question: Is there a C++ compiler that I can use to go cross-platform with development?I need to develop the same DLLs for AS400, Sun, and Windows. Answer: I’m not sure I understand what you’re trying to do. A dll is something you only have on Windows, and even on Windows

Are Borland’s Delphi and C++Builder code-similar?

Question: I am trying to decide between purchasing Borland’s Delphi or C++Builder. Can the VCL code written to work in Delphi also work in C++Builder (latest versions for both)? Answer: Yes, the VCL code works in C++ Builder just as well.

C++ Comments

Question: Why isn’t C commenting style preferred in C++? C commenting style definitely looks neater and more readable than the C++ commenting style. Answer: /* comments in C++ are just as good as // comments. In fact, I use both of them interchangeably. The main difference between the two is

Accessing Arrays

Question: Normally, you access an array by the number of the element you want. Is it possible, in C++, to access an element by the value and return the number? Answer: Everything’s possible. You should look at STL’s map container. It does exactly that.

Display Date and Time of File Upload

Question: How can I display the date and time a file was uploaded to my Web server using ASP? Answer: If you can access the file from an ASP page, you can obtain information about the file, including Date Created: Dim fs, f, s, strFile strFile = “YourFileNamehere” Set fs

Updating a VB6 DLL on the Web Server

Question: We have Internet Information Server (IIS) 4.0 running Active Server Pages (ASP) with a Visual Basic 6.0 DLL serving data content to the ASP pages. The problem lies when we try to update the DLL on the Web server with a new version, it appears to always be in

No more posts to show