|
If you are using any libraries in your application, of course you have to include them when deploying the application. That has nothing to do with the fact that the libraries comes from Oracle. You don't need to install Oracle to connect to an Oracle database.
---
Year happy = new Year(2007);
|
|
|
|
|
As I told you, we need a library called OCI.dll which comes from the Oracle home (bin folder inside Oracle home) and also other DLLs to enable the application to connect to Oracle, so how do we not need to install Oracle on the PC if we need these DLLs which are coming from Oracle and not embedded in the .Net framework???
|
|
|
|
|
You need to install the Oracle client on the users machine. You will also have to configure the tnsnames.ora file to be able to connect to the database.
Mike Lasseter
|
|
|
|
|
What Guffa means is that you do not need to install the Oracle database server on the PC. You may need to install some small redistributable parts of Oracle to allow the client to connect to the server. This should be documented in the .NET data provider you are using.
|
|
|
|
|
The system requirements for the .NET Framework Data Provider for Oracle state that the machine must have the Oracle Client, 8i Release 3 or greater or 9i or greater if your accessing a UTF16 database, installed in order to work.
System Requirements[^]
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
So gyes, if we wanna finish this conversation about my question, we can say as a result that we should install the Oracle client on the PC and also change the TNS names...realy I did that before but it is realy not good thing in the .Net framework that it needs some files from Oracle client to connect to Oracle DB. I think the .Net framework team developers must include those files inside the .Net framework to be more flexible and to less the need to install Oracle client each time you install your application into some machine in your company. Finally thank you very much gyes.
Kind Regards
OBarahmeh
Palestinian Central Bureau of Statistics (PCBS)
Ramallah-Palestinian Territory
|
|
|
|
|
obarahmeh wrote: but it is realy not good thing in the .Net framework that it needs some files from Oracle client to connect to Oracle DB.
Why not? Besides, there are licensing issues here. Microsoft can't package parts of the Oracle client in the .NET Framework because Oracle won't let them. There's also an issue of functionality with different versions of Oracle. Like was stated, if you have a UTF16 database, you neeed to change out the underlying Oracle Client. This saves you from having to recompile your code and release a different version just to support the different encoding! How is this a bad thing????
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
hai...
recently, just this afternoon i being asked by my superior to do vb function for retriving data(collect data and save in database)using vb6,in order for me to be transfered from acc to it department(web developer assistant)...it just a simple one but means a lot for me..imagined that i haven't touched vb since 2 years after my graduation in 2004...the rest software maybe..but not vb...
any guys know...a simple coding for this..thks..i have to submit this thursday morning......even i asked help from my friends...
i need to study and review all the thing again...oh gosh..i trying to sort out this mess...
,
sissy12
|
|
|
|
|
Dim DbaseConn As ADODB.Connection
Dim RecSet As ADODB.RecordSet
Set DbaseConn = New Connection
Set RecSet = New Recordset
DbaseConn.open(dsn="dsnname")
'For reading the records...........
RecSet.open ("Select * from tablename")
do while not RecSet.EOF
msgbox(RecSet!column1)
msgbox(RecSet!column2)
...........................
RecSet.movenext
loop
'For Add new record..................
RecSet.open ("Select * from tablename")
RecSet.addnew
RecSet!column1="value1"
RecSet!column2="value2"
RecSet.update
'finally close the connection
RecSet.close()
DbaseConn.close()
''''''''It's helpful for u
Keep Smiling !!!
Parwej Ahamad
g_parwez@rediffmail.com
|
|
|
|
|
In my application I have a typical setup:
* Dataset with numerous DataTables, each with a TableAdapter
* Various BindingSources
I want to add a new record to a table of which I only fill one record at a time into my DataTable, meaning the DataTable in the DataSet will always only have 1 record.
The table in my database (SQL2000) has an Identity(1,1) column as the Primary Key.
When I add a new record to my DataTable, the first problem I get is that the Primary Key for the new record is wrong, probably because it doesn't know what the last identity insert value in the SQL table is. But even when I specify a value an Exception occurs at my BindingSource.EndEdit() section of the code. This exception reports that I cannot insert a NULL value into Column "ID"(or whatever my PK column is named)
Where can I find an example of adding a user entered record to a datatable with an Identity column. This must be done using the controls on the form that are bound to the datasource.
(WinForms VB.Net, Visual Studio 2005)
you can't forget something you never knew...
"Watching Migthy Joe Young made me hate my life..................................I want a gorilla!" A. Havemann
|
|
|
|
|
Google is the short answer.
Long answer follows:
Ideally, you should populate the data table, post the data back to the DB and get the newly added ID back (using stored procs?)
Shreekar
|
|
|
|
|
It's when I attempt to update the DB when the exception occurs. All I want is for the DataSet to update the DB without supplying a PK, and not through an exception because one wasn't supplied.
"you can't forget something you never knew..." M. Du Toit
"Watching Migthy Joe Young made me hate my life..................................I want a gorilla!" A. Havemann
|
|
|
|
|
evilnoodle wrote: the first problem I get is that the Primary Key for the new record is wrong,
why do you say this?
Shreekar
|
|
|
|
|
Because the DataTable is filled with only one record, when adding a new one, I basically clear the data from the DataTable to enter the new record, but the communication between the actual DB and my application is lacking because it the identity that's automatically entered into the PK column is one bigger than the last record the DataTable was filled with, and from there on, every new record is given a PK value of 1 more than the last one.
Say the next entry in my DB requires a ID of 2110, but my DataTable is loaded with a record ID:1152, clicking my new record button which does a BindingSource.AddNew() adds a record with ID 1153.
"you can't forget something you never knew..." M. Du Toit
"Watching Migthy Joe Young made me hate my life..................................I want a gorilla!" A. Havemann
|
|
|
|
|
Hi,
I am working on a project that uses a VB.NET application for sending e-mails. This application works as a scheduler and is scheduled to start after every 1 min. It works as follows:
1. It picks up the projects that are scheduled to run(send mails).
2. It picks up the contacts to which the mail needs to be sent.
3. It sends the mail.
Now I have used threading so that each project picked up in the 1st step is executed as a different thread. Now the problem is that when the scheduler starts again after 1 min, the projects picked by this instance have to wait for completion of all the threads belonging to the previous instance. I want these new threads to also start concurrently with the previous threads that are already running.
Any suggestions on this will be highly appretiated.
regards,
Sandeep
|
|
|
|
|
Perhaps if you can't finish the task in a minute, you need to run it less often ? I mean, you can't get more speed out of having all those threads, the older ones will just wait longer, for the ones that have been started.
You can create all the threads you want, that's not an issue. But, I wonder how many is practical.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hi,
Thanks for the reply but why it is happening that threads(say 4 project threads) belonging to the one instance of the scheduler(our application) and other threads belonging to separate instance(2nd instance that will be created after 1 minute), what exactly prevents threads from 2nd instance to start.Is there any background and foreground threads kind of issue.
Regards
Sandeep
|
|
|
|
|
Nothing, I don't see how that is possible. What makes you think it's the case ? Why is it running twice ? How many instances will be running, over time ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Let me explain:
Suppose the scheduler runs for the first time and it picks 5 projects(5 threads). Supposing each project has 1000 contacts to whom the mail needs to be sent.
Now the scheduler is scheduled to run after every 1 min. So after 1 min the second instance of the scheduler starts and it picks 5 more projects(5 more threads). Now these new threads keep on waiting till the mails are sent to the contacts of first 5000 contacts. It is only after these mails are sent the threads in the second instance start.
Our system sends about 600 mails in a minute. Even if the mails are not sent for the previous instance the threads in the second instance should atleast start.
|
|
|
|
|
OK, it sounds like the mail class can only send one mail at a time ( which seems possible ). So, as I said, the question is, why does it have to run every minute ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
We need to run it quite frequently because the projects added by our clients should be serviced as soon as they are added.
Even if we increase the time of executing the scheduler it may solve the problem temporarily. But my point is why should the threads wait, I mean this should not happen (conceptually atleast!).
|
|
|
|
|
Sandeep_S wrote: We need to run it quite frequently because the projects added by our clients should be serviced as soon as they are added.
If they wait more than 60 seconds, the world will end ?
Really, you should have a single queue, which gets added to, not several queues. It seems to me that the answer is almost certainly that your method of sending emails is written this way, so a single queue is formed, even if you didn't impliment your app this way.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
This is the way we have implemented the app:
Dim objThreadList As ArrayList
Sub Main()
Schedule()
End Sub
Public Sub Schedule()
For Counter = 0 To dsProject.Tables(0).Rows.Count - 1 ''Loop runs for each project
CallThread(dsProject.Tables(0).Rows(Counter), Counter)
Next
End Sub
Public Sub CallThread(ByVal drProject As DataRow, ByVal counter As Integer)
objThreadList.Add(New Thread(AddressOf ThreadProcess))
drThread = drProject
objThreadList(counter).Start()
End Sub
Public Sub ThreadProcess()
Dim objClsProject As New clsProjectThread
objClsProject.ActualProcess()
End Sub
Public Sub ActualProcess()
'Code for sending mail
End Sub
|
|
|
|
|
I don't see how that proves anything. Like I said, it seems to me like the code for sending emails is forming a queue of mails to send. The mails from the first thread, get sent first.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Sandeep_S wrote: the projects picked by this instance have to wait for completion of all the threads belonging to the previous instance
Why?
---
Year happy = new Year(2007);
|
|
|
|