Asked by:
System.EntryPointNotFoundException--Unable to find an entry point named 'OCIDateTimeFromArray' in DLL 'oci.dll'.

Question
-
User-1976290245 posted
Hi All,
I am using a web method to submit my form data , having Oracle DataBase. And in my local development machine every thing is fine.I am successfully able to submit my form data asynchronously through a web method. But the same project when deployed to test server then while submiting form date there an error occurs as stated above. One field in the table is of DataTime type, and i am inserting server's date into that field, all other fields are of type varchar2 or int.
I googled about that but it seems that no one has got such error.
Can anyone help me here ?Sunday, February 13, 2011 11:42 PM
All replies
-
User-693248168 posted
Hi,
Where exactly are you getting this error? In your webservice or in your calling code?
Are you sure the webservice is running and accessible from the client?
Monday, February 14, 2011 8:48 AM -
User-1976290245 posted
Hi,
Where exactly are you getting this error? In your webservice or in your calling code?when i am submitting the form i am getting error in error alert box.Probably this error is thrown from Web Service. But i am not sure. Can you tell how can i know that error is in web Service or my calling code ?
Are you sure the webservice is running and accessible from the client?Yes, i have tested it throughly from my development machine. Form is submitted successfully each time. One more interesting thing is that database in both cases are same. For my development i am using the same database..schema...tables...infact all database objects are same for my development environment and the Test Server.
But i am getting error in Test server. I am getting error when i submit the form data.Which as i have already said going asynchronously.
Monday, February 14, 2011 10:23 AM -
User-1976290245 posted
It is Web Service error :
Sys.Net.WebServiceFailedException:The server method "method name" failed wilth following error:
System.EntryPointNoyFoundException--Unable to find an entry point named 'OCIDateTimeFromArray' in DLL 'oci.dll'.
So, how can i resolve this problem ?
Monday, February 14, 2011 11:56 PM -
User-693248168 posted
The Error is generating from the webservice.
If it give error on one client and does not on another, then it may be the way you are passing arguments to this method.
Just a wild guess.
Check the date format on both the clients. I suspect you are passing the date format in different formats from both clients.
Try checking that.
Tuesday, February 15, 2011 1:40 AM -
User-1976290245 posted
It is giving error on all client , even in my machine also. When i am using my machine to submit form that is hosted in Test Server then also error is generated. But when my same machine is submitting data in form that is running on my local machine then data is submitted.
What to do no ?
Tuesday, February 15, 2011 2:45 AM -
User-693248168 posted
Hi,
Can you show us how you are passing arguments to the webservice?
Thanks
Tuesday, February 15, 2011 3:13 AM -
User-1976290245 posted
From client code arguments are passed through javascript variables. I have created javascript variables are assigned those variables with the corresponding client html elements.And finally those values are passed while calling the web method.
In aspx page , in Script tag i have used these variables to store html element's id.
var element1='<%= aspxControl.ClientID%>';
In a separate javascript file a function is called on Submit button click.In that function this elements value is retrived like this:
var val1=document.getElementById(element1).value;
finally these values are passed to Web Method.Any more requirement please...
Tuesday, February 15, 2011 3:40 AM -
User-1976290245 posted
In table one column i gave is of type Date. In web method i am using OracleParameters in insert query to insert the data. The corresponding OracleParameter's type i have assigned is of type "OracleType.Timestamp" for that Date field.
Tuesday, February 15, 2011 3:49 AM -
User-1976290245 posted
Is there any Date format problem between database and Test Server ?
I am using Server's time to insert into Date field of database.And from my local system end everything is working fine but when used from remote server error is occuring...error is not clear to me but there are some date time error as i said already.
Is there any Server's datatime format setting ?How can i know that format ?
Friday, February 18, 2011 11:29 PM -
User-693248168 posted
Check in "Settings" --> Control Panel --> Regional Settings.
If you are passing parameters in proper fashion, then the datetime format should not matter. Hope you are not concatenating the time stamp in the query and pass it.
Saturday, February 19, 2011 12:32 AM -
User-1976290245 posted
Other applications on the same server are using this format of date "d/M/yyyy" . I have converted the System date to this format and after that i am inserting this data. But still facing the same error.
System.EntryPointNotFoundException--Unable to find an entry point named 'OCIDateTimeFromArray' in DLL 'oci.dll'.
Please help what should i do now ?
Saturday, February 19, 2011 1:40 AM -
User-1976290245 posted
If this problem is not solved here please anyone tell where to post this question .Which location (or other forum site) will be appropiate for this problem . I am baffled by searching this error on GOOGLE. No one in this world has got this error .Anyone can help me ?
Saturday, February 19, 2011 3:08 AM -
User-693248168 posted
Hi,
If you dont mind, can you share the work with me. I would like to try to debug from my end. I cannot confirm if I can resolve the issue but let me try.
Thanks.
Saturday, February 19, 2011 3:36 AM -
User-1976290245 posted
And here is the code that you wanted from my side, but i do'nt think this will help . I think that problem is server side.oci.dll file is perhaps missing from there. But i do not know anything about that. What is its purpose and like that.Anyway, lets see whether my code will revel the problem to you.
Imports System.Web Imports System.Web.Services Imports System.Web.Services.Protocols Imports System.Data Imports System.Data.OracleClient Namespace WebService <System.Web.Script.Services.ScriptService()> _ <WebService(Namespace:="http://tempuri.org/")> _ <WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _ <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Public Class Class1 Inherits System.Web.Services.WebService Dim Column(0 To 9) As String Dim ColumnType(0 To 9) As OracleType Public Sub New() InitializeColumns() InitializeColumnType() End Sub Private Sub InitializeColumns() Column(0) = ":ID" Column(1) = ":TITLE" Column(2) = ":DESC" Column(3) = ":AUTH_NM" Column(4) = ":POINTS" Column(5) = ":CRTID" Column(6) = ":CRTTS" Column(7) = ":UPDID" Column(8) = ":UPDTS" Column(9) = ":ACTIVE" End Sub Private Sub InitializeColumnType() ColumnType(0) = OracleType.VarChar ColumnType(1) = OracleType.VarChar ColumnType(2) = OracleType.VarChar ColumnType(3) = OracleType.VarChar ColumnType(4) = OracleType.VarChar ColumnType(5) = OracleType.VarChar ColumnType(6) = OracleType.Timestamp ColumnType(7) = OracleType.VarChar ColumnType(8) = OracleType.Timestamp ColumnType(9) = OracleType.VarChar End Sub <WebMethodAttribute()> _ Public Function SubmitForm(ByVal ID As String, ByVal TITLE As String, _ ByVal DESC As String, ByVal AUTH_NM As String, _ ByVal POINTS As String, ByVal CRTID As String, _ ByVal CRTTS As String, ByVal UPDID As String, _ ByVal UPDTS As String, ByVal ACTIVE As String) As String Dim params(0 To 9) As OracleParameter Dim ID As String = IDFind.FindNextID() //this is some other method call. For count As Byte = 0 To 9 params(count) = New OracleParameter(Column(count), ColumnType(count)) Next Dim query As String = String.Empty query = "INSERT INTO MyTable (" For count As Byte = 0 To 9 query &= Column(count).Substring(1, Column(count).Length - 1) If count <> 9 Then query &= "," End If Next query &= ") VALUES (" For count As Byte = 0 To 9 query &= Column(count) If count <> 9 Then query &= "," End If Next query &= ")" Dim dayOfMonth As String = DateTime.Now.Day Dim monthOfYear As String = DateTime.Now.Month Dim year As String = DateTime.Now.Year Dim now As String = dayOfMonth & "/" & monthOfYear & "/" & year Dim dt As Date = DateTime.ParseExact(now, "d/M/yyyy", System.Globalization.CultureInfo.CurrentCulture) params(0).Value = ID params(1).Value = TITLE params(2).Value = DESC params(3).Value = AUTH_NM params(4).Value = POINTS params(5).Value = CRTID params(6).Value = dt params(7).Value = UPDID params(8).Value = dt params(9).Value = ACTIVE Dim conn As New Connection Dim con As OracleConnection = conn.GetConnection Dim cmd As New OracleCommand cmd.Connection = con cmd.CommandType = CommandType.Text cmd.CommandText = query For count As Byte = 0 To 9 cmd.Parameters.Add(params(count)) Next con.Open() cmd.ExecuteNonQuery() con.Close() return "some message" End Function End Class End Namespace
Saturday, February 19, 2011 5:40 AM -
User-693248168 posted
Hi,
I could not find out what your Column() and ColumnType() return.
You dont need to write these lines of code.
Dim dayOfMonth As String = DateTime.Now.Day Dim monthOfYear As String = DateTime.Now.Month Dim year As String = DateTime.Now.Year Dim now As String = dayOfMonth & "/" & monthOfYear & "/" & year Dim dt As Date = DateTime.ParseExact(now, "d/M/yyyy", System.Globalization.CultureInfo.CurrentCulture)
You can just give
Dim dt As Date = DateTime.Now
And finally make sure you are assigning the dbtype correctly for your datetime field.
Give this line of code while assigning param(8) to dt
params(8).Value = dt params(8).DbType = Data.DbType.Time ' or params (8).DbType =Data.DbType.DateTime
Try this and let me know the result.
Also let me know the definition for your Column() and ColumnType functions.
Thanks.
Saturday, February 19, 2011 6:29 AM -
User-1976290245 posted
As we can see Column() and ColumnType() ,these two subroutines are returning nothing, but they are called by Class1's constructor to initialize two array .One array contains column name as given in the database table and another array is for storing the corresponding data type for the columns.
This i did to make the insert query independent of column name and column type .Also since i am using CommandText method of OracleCommand to insert data into table so i have to use a sing;e colon ":" preceeding the column name.
Next for this:
Dim dayOfMonth As String = DateTime.Now.Day Dim monthOfYear As String = DateTime.Now.Month Dim year As String = DateTime.Now.Year Dim now As String = dayOfMonth & "/" & monthOfYear & "/" & year Dim dt As Date = DateTime.ParseExact(now, "d/M/yyyy", System.Globalization.CultureInfo.CurrentCulture)
I was using the same code as you gave i.e.,
Dim dt As Date = DateTime.Now
I was earlier using the above given code,but same error was occuring previuosly.
In these lines
For count As Byte = 0 To 9 params(count) = New OracleParameter(Column(count), ColumnType(count)) Next
i am assigning proper datatype to OracleParameter (as i think).
Is there any difference between OracleType.Timestamp and Data.DbType.Time ?
Saturday, February 19, 2011 9:23 AM