|
The Oracle provide is specifically written for interaction with Oracle databases (likewise the SqlClient is specifically from MS SQL Server databases) and therefore would provide better performance, but would limit your program to work purely with Oracle.
The OleDb is a more generic interface with would mean that you could use pritty much any SQL compatible database system such as Oracle, SQL Server MS Access, MySQL etc as your back-end database provided you limit your interact with the database to pure ISO SQL command.Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
Thanks To: Steve Jowett
It’s a dedicated class for oracle server. So other databases (MySQL, MS SQL or MS Access) are not considered while build-up it.
I’m pleased for your advice but I can’t totally understand what u said bellow (about comment) of your Reply.
1st time I used ole db but that had a problem inserting date before 2000(‘1-jan-2000’ no error but before that date ’31-Dec-1999’ date generated an error) generated a strange error. So finally choose OracleProvider.
|
|
|
|
|
Based on what you said
kisukortechai wrote: It’s a dedicated class for oracle server
the Oracle provider is the right choice.Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
kisukortechai wrote: System.Data.OleDb(.Net Faramework Data provider for ole db)
That's a "general" database driver, and can be used to connect to SQL, Oracle or MS Access.
kisukortechai wrote: System.Data.OracleClient(.Net Faramework Data provider for Oralce)
That's the one that was created specific for Oracle, somewhat comparable to System.Data.SqlClient for SQL Server. This one is said to be faster and will have better support for Oracle-specific type and functions.I are Troll
|
|
|
|
|
Thanks To: Eddy Vluggen
I’m working only for Oracle server so in future I’ll need ole db if I change my mind. Am I okay?
|
|
|
|
|
You'd be largely okay;
- you'd be a bit more okay if you'd program against the interfaces. There's an CodeProject article here[^] that uses IDbConnection to make it easier to switch to another client.
- Other databases might speak a different SQL dialect. Oracle favors PL/SQL, SQL Server favors TSQL.
- There's also a small difference in formatting a parameter.
And you're welcome, off course I are Troll
|
|
|
|
|
I have a table InvoiceMaster table. And the table datas are available like the following manner
Invoice_No,Invoice_date,Customer_code,Qty,unit_rate,Item_Amount
10,12/02/2010,abc1,10,15.00,150.00
10,12/02/2010,abc2,11,10.00,110.00
11,12/02/2010,abc3,10,15.00,150.00
11,12/02/2010,abc2,11,10.00,110.00
11,12/02/2010,abc4,14,10.00,140.00
like wise...
Now the problem is , while using in multiuser [LAN] network, while saving time how to allocate the different Invoice number
for various user.
Thanks For The Ideas.. .
|
|
|
|
|
Classic problem.
My recommendation is not to "reserve" invoice numbers, but just create a transaction which will save the data and generate the invoice number at that time.
If you are using SQL Server, you can define a field to be an "Identity" column which will automatically generate the next available number for you.
The other way of handling this is to create a small table call it "Sequences" with columns, "Seq Name","Next Number" and you can use it to hold the next available invoice number.
Hope this helps.
|
|
|
|
|
Is there a way to determine from the datagridview.rows property whether or not the row is filtered by its controlling dataview? row.displayed and row.visible don't seem to do it.
Thanks
|
|
|
|
|
Are you saying that you are displaying rows from a bound source AND have added unbound rows to the DGV?
|
|
|
|
|
VB6Q I have 5 buttons. clicking them once changes that button's color to, say orange. And when another button is clicked that will become orange and the previous will reset to original color
So i want to toggle their color's depending on which one is clicked.
I want code to be efficient. No repeating codes.
Any ideas? Just tell me some ideas how to go about implementing it.
my idea:
send all button click events to a change color function. but we need to know which button has been clicked
Any other ideas welcom
|
|
|
|
|
ssonby wrote: send all button click events to a change color function. but we need to know which button has been clicked
Correct: you should just pass a reference to the clicked button.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
ya how will i pass a refernce. its VB6. how do i come to know which button clicked it
|
|
|
|
|
Each button has it's own click event. In that event change the current button to orange and then set all the other buttons to the original color. Pretty simple actually.
EDIT:
Sorry, didn't see the part about no duplicate code. What you can do is create a control array out of the buttons then just reference the index of the button clicked. Also simple.-------------------------------------
Do not do what has already been done.
Absolute power corrupts absolutely.. but it ROCKS absolutely, too.
|
|
|
|
|
I knew that. But I dont want to keep it as array. as i can't give it my own name to each. it becomes a boring name. Is there a way to know who clicked it. like a 'caller' class or 'sender'. In .NET we have that 'e' variable which can references to the current button clicked
Thanks for your responses
|
|
|
|
|
About the only way to make it less generic is to create constant variables for each index so they're more descriptive. I'm not aware of any kind of 'sender' functionality. I guess you do what you can with the tools you're given. -------------------------------------
Do not do what has already been done.
Absolute power corrupts absolutely.. but it ROCKS absolutely, too.
|
|
|
|
|
and abandon doing this in VB6. It's hasn't been supported by MS in quite some time.
Move up to VB.NET at least.
|
|
|
|
|
Good day,
What is the difference between these methods of updating and which is better:
1. Add new row to datatable
Dim dr As DataRow = dt.NewRow
dr.Item("OrderStatus") = "OPEN"
dt.Rows.Add(dr)
'Update new row to database
Dim qry As String = "SELECT * FROM Table"
Conn.Open()
Dim da1 As New SqlClient.SqlDataAdapter
da1.SelectCommand = New SqlClient.SqlCommand(qry, MAIN.data.Conn)
Dim cb1 As SqlClient.SqlCommandBuilder = New System.Data.SqlClient.SqlCommandBuilder(da1)
da1.Update(MAIN.data.DS, "Table")
conn.close
2. Execute non query - does this work as stored procedure?
Dim strSQL As String = "INSERT INTO Table (OrderStatus)VALUES (@OrderStatus)
Dim cmdAddNew As New SqlClient.SqlCommand(strSQL, Conn)
cmdAddNew.Parameters.Add("@ScanStatus", SqlDbType.Varchar,50).Value = "OPEN"
Conn.Open()
cmdAddNew.ExecuteNonQuery()
Conn.Close()
|
|
|
|
|
I would say it all depends on the situaton. If you have a DataGrid bound to a DataTable, and your user adds a record through the DataGrid, then the first instance would probably be better. If in your data Layer you need a function to Save an object then I would use the second option. In the second option a stored procedure would definitely work. You need to set strSQl to the name of your Stored procedure, and then add
cmdAddNew.CommandType = CommandType.StoredProcedure .
|
|
|
|
|
Hi mates,
How can I join an access table with sql server table using vb.net. In access form, I can use the link table and by creating new query I can drag and drop the sql table and access table. How will I do that in vb.net. I tried dataset but the connection is only for access or sql server. Currently I have two database in my program. One is mdb and other is sql server. Please help me. Thanks in advance.C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
C#Coudou wrote: How can I join an access table with sql server table using vb.net
You can't, what you need to do is get both tables into the business layer (VB), using their respective connections, and then use a Linq query to do it. I hate linq it is one of the greatest disappointments I have run across but in this instance it is the tool for the job.
I have found this link[^] useful to my great disgust.Never underestimate the power of human stupidity
RAH
|
|
|
|
|
thank you for your suggestion. i read the link but unfortunately linq is for only select statement. i need to update, insert, delete access tables which is one of the column is equal to sql. Heres my sample query.
Where: W_Analysis (access mdb) and OrderMaster/ChemMaster (sql database)
Insert into W_Analysis(OrderNo,ItemCode,ItemName,ChemCode,ChemName)
Select OrderMaster.OrderNo,OrderMaster.ItemCode,OrderMaster.ItemName, ChemMaster.ChemCode, ChemMaster.ChemName
From OrderMaster Inner Join ChemMaster On OrderMaster.ItemCode = ChemMaster.ChemCode
Where ChemMaster.ChemCode = 1159C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
I have a report project where a timer is polling the DB for a user abort. Once the abort is discovered I want to call a procedure on the master thread interrupting it so that it can abort the report. This way I don't have to get checking for an abort in the master thread.
I tried using delegates and the invoke method hoping that it would work like the form.invoke which calls the procedure in the form's thread. But it didn't work. Anyone know how to do this without using forms?
Here is a simple example:
Delegate Sub AbortDelegate()
Public Class ReportProcesser
Private _reportThreadID As Integer
Friend Abort As New AbortDelegate(AddressOf AbortReport)
Public WithEvents CheckForAbortTimer As New Timers.Timer(500)
Public ReadOnly Property ManagedThreadID() As Integer
Get
Return _reportThreadID
End Get
End Property
Public Sub New()
_reportThreadID = Threading.Thread.CurrentThread.ManagedThreadId
End Sub
Public Sub AbortReport()
MsgBox("Report Thread ID: " & Me.ManagedThreadID & vbCrLf & _
"Abort Report On Thread ID: " & Threading.Thread.CurrentThread.ManagedThreadId & vbCrLf)
End Sub
Private Sub CheckForAbortTimer_Elapsed() Handles CheckForAbortTimer.Elapsed
Static alreadyProcessing As Boolean = False
If Not alreadyProcessing Then
alreadyProcessing = True
Me.Abort.Invoke()
alreadyProcessing = False
End If
End Sub
End Class
Module Main
Sub main()
Dim report As New ReportProcesser
report.CheckForAbortTimer.Start()
Dim startTime As Date = Now
Do Until DateDiff(DateInterval.Minute, startTime, Now) >= 5
'end in 5 min or when stopped from Visual studio
Loop
End Sub
End Module
Thanks.
|
|
|
|
|
Hi all.
I want to know that how can I identify if a file is an application or a setup by vb.net programming with the extension ".exe".
Suggest me some ways.
Thanks.
Gagan
|
|
|
|
|
There's no way to tell the difference. An .exe is an .exe is an .exe. There's no way to tell what that .exe does.
|
|
|
|