Friday, September 23, 2005

when i installed Oracle 9i i had created 2 database on the Server(Windows XP) through GUI Database Administration.

After that i went to My computer Properties and went there and stored ORACLE_SID as my one DBName. Now when i want to connect to oracle with this command in

SQLPLUSW / NOLOG "conn / as sysdba" it gives an Error as "Error - ORA - 24314 Service handle not initialized" and when i try to connect to Oracle through normal SQL giving user name Scott/tiger it gives another Error "ORA 12560 Protocol adapter error”

1. check whether the oracle services r running in the control panel - services. all the oracle services start with oracle.

2. check whether the listerner is running
in the command prompt
c:\ set oracle_sid=
c:\ lsnrctl status
c:\lsnrctl stop
c:\lsnrctl start

3. check whether u have created the connect string in the tnsnames.
use net8 easy config to create one.

1st point in point 2 should solve the issue

Thursday, September 22, 2005

For dynamic orderby clauses in Stored procedure

CREATE PROCEDURE getEmployees ( @OrderByClause varchar(100) ) AS

-- Create a variable @SQLStatement
DECLARE @SQLStatement varchar(255)

-- Enter the dynamic SQL statement into the
-- variable @SQLStatement
SELECT @SQLStatement = 'SELECT EmployeeID, FirstName, LastName, SSN, Salary ' +
'FROM Employees ORDER BY ' + @OrderByClause

-- Execute the SQL statement

Wednesday, August 31, 2005

Hold down your Ctrl+Alt+upperArrow keys down at the same time.

Wednesday, June 22, 2005

To get a date if we know the format there is no direct fuction in vb. below code helps you achieve this task.

Private Function getMyDate(ByVal date_string As String, ByVal date_format As String) As Date
Dim date_parts() As String, date_format_parts() As String
Dim day_part As String
Dim month_part As String
Dim year_part As String

date_parts = Split(date_string, "/")

If UBound(date_parts) = 0 Then
date_parts = Split(date_string, ".")
date_format = Replace(date_format, ".", "/")
End If
If UBound(date_parts) = 0 Then
date_parts = Split(date_string, "-")
date_format = Replace(date_format, "-", "/")
End If

date_format_parts = Split(date_format, "/")

Select Case Left(LCase(date_format_parts(0)), 1)
Case "d"
day_part = date_parts(0)
Case "m"
If Len(date_format_parts(0)) > 2 Then
month_part = date_parts(0)
month_part = MonthName(date_parts(0))
End If
Case "y"
year_part = date_parts(0)
End Select
Select Case Left(LCase(date_format_parts(1)), 1)
Case "d"
day_part = date_parts(1)
Case "m"
If Len(date_format_parts(1)) > 2 Then
month_part = date_parts(1)
month_part = MonthName(date_parts(1))
End If
Case "y"
year_part = date_parts(1)
End Select
Select Case Left(LCase(date_format_parts(2)), 1)
Case "d"
day_part = date_parts(2)
Case "m"
If Len(date_format_parts(2)) > 2 Then
month_part = date_parts(2)
month_part = MonthName(date_parts(2))
End If
Case "y"
year_part = date_parts(2)
End Select
getMyDate = CDate(day_part & " " & month_part & _
", " & year_part)
End Function

Tuesday, March 01, 2005

oracle 8i installation bug and remidy.
Oracle8i wont in install. the installation will terminate soon after the start without going further. below is the fix

Windows XP Pro or Windows 2000 with Pentium 4 only

· Copy all the files/folders from the oracle 8i CD on to a folder on your c: drive. Do NOT name this folder Oracle.
· Change the name of the symcjit.dll file.
For Windows XP: Change from symcjit.dll to symcjit_disc.dll
For Windows 2000: Change the symcjit.dll to symcjit.dll.ori
The path to this file is:
C:\stage\components\oracle.swd.jre\\1\Data Files\Expanded\jre\win32\bin
· Now go back to your main c: drive directory and run the setup file.

Web Hosting Cheap PHP Plans Also at For free flags of the world