Monday, July 14, 2008

Working with microsoft DLL,ODBC connection and IIS for a java developer

DLL's are dynamic link library. They are like .jar files in java.
Normally the error we get in dll's are due to dependency on other dll's. Tools like dependency walker and dll explorer come for the rescue.

To register a dll use(like loading jars to JVM)
regsvr32 [DLL path]

also
rundll32 [dll path]

IIS
  • IIS is web server provided by microsoft.
  • For the IIS we need to configure the components.
  • For this, go to control panel-- admin tools --computer mgmt --component services -- computer--my computer -- COM+ applications -- new application --Add users and imports ...Thats it the IIS will pick it up...

To unit test a package in the dll create a x.vb file with the below code:

set testobj = nothing
set testobj = createobject("IMPORT.Job")

msgbox "PR: " & testobj.PathRemoved("C:\development\miscellaneous\COM\testmdb")

if(testobj.DeleteFile ("C:\development\miscellaneous\COM\test.mdb"))Then
msgbox "Deleted your file!"
End if



--------------------------------------------------------------------------------------------------------------
Oracle connection through microsoft:

update \oracle\product\10.2.0\client_1\NETWORK\ADMIN\tnsnames.ora
Go to control panel-- datasourc(ODBC) connections --add new connection in first tab.Select database name and auth details.Do a test connection. Thats it

-----------------------------------------------------------------------------------------------------------------

I need to set a number of environment variables via a bat file currently I m executing as below.
The user environment variables are updated but I want to set the system ones, what do I have to do.
Also when I try to add paths to the path variable I get an error
@echo on
setx IT_CONFIG_DOMAINS_DIR=C:\Program Files\IONA\etc\domains
setx IT_DOMAIN_NAME=BankWorld
setx IT_LICENSE_FILE=C:\Program
Files\IONA\etc\Orbix_licenses.txt
setx IT_PRODUCT_DIR=C:\Program Files\IONA
setx PATH=%PATH%;C:\Program Files\IONA\bin;C:\Program Files\IONA\asp\6.3\bin
pause
:end
pause

How about using the -m switch?
setx IT_CONFIG_DOMAINS_DIR=C:\P
rogram Files\IONA\etc\domains -m
setx path "%path%;c:\new directory"



Using Cygwin
Where is my windows drive? Ans: inside cygdrive<br />bash$ cd C:/Windows<br />bash$ pwd<br />/cygdrive/c/Windows</pre><br /><b>IIS<br />Changing the default port:<br /></b><table class="list ol"><tbody><tr><td class="number"><small><small></small></small></td></tr><tr><td class="number"><small><small></small></small></td></tr></tbody></table><small><small>Microsoft Internet Information Services versions 4.0 to 6.0</small></small><script type="text/javascript">loadTOCNode(2, 'moreinformation');</script><table class="list ol"><tbody><tr><td class="number"><small><small>1.</small></small></td><td class="text"><small><small>Open Internet Service Manager or Internet Information Services (IIS) Manager.</small></small></td></tr><tr><td class="number"><small><small>2.</small></small></td><td class="text"><small><small>If necessary, expand the Web server that you want, and then expand <b>Web Sites</b>.</small></small></td></tr><tr><td class="number"><small><small>3.</small></small></td><td class="text"><small><small>Right-click the Web site that you want to change.</small></small></td></tr><tr><td class="number"><small><small>4.</small></small></td><td class="text"><small><small>Click <b>Properties</b>.</small></small></td></tr><tr><td class="number"><small><small>5.</small></small></td><td class="text"><small><small>Click the <b>Web Site</b> tab.</small></small></td></tr><tr><td class="number"><small><small>6.</small></small></td><td class="text"><small><small>Change the TCP Port Number in the <b>TCP Port</b> edit box (or click <b>Advanced</b> for multiple Port settings).</small></small></td></tr><tr><td class="number"><small><small>7.</small></small></td><td class="text"><small><small>Click <b>OK</b> to save the changes.</small></small></td></tr></tbody></table><br />Ref:<br /></div><small>Environment variable excellent reference : http://www.wilsonmar.com/1envvars.htm<br />IIS port change ref: http://support.microsoft.com/kb/149605<br /><br />IE browser issues<br />Having made a web application live, the user logoff action doesn't actually log off in IE. It works fine on firefox.. So the problem is obviously with the browser. Crap the microsoft IE doesn't handle caching well inspite of setting the pragma in the head tag. You need to put it in the bottom of the page as well.<br />Put the following in top and bottom under html tag<br /><pre><br /><head><br />   <meta http-equiv="cache-control" content="max-age=0, must-revalidate, no-cache, no-store, private"><br />   <meta http-equiv="expires" content="-1"><br />   <meta http-equiv="pragma" content="no-cache"><br /></head><br />

Here is the fix.
http://support.microsoft.com/kb/222064/

http://www.vbaccelerator.com/insprob.htm







No comments: