|
ok one thing more... the code looks fine except the "DS"? i have to decalre it first before I can use it...
|
|
|
|
|
ds is DataSet. i thought u can easily get it .anyway declare it as
Dim ds As New DataSet()
|
|
|
|
|
Hi ive programmed this: but it doesnt work, there are no errors showing just it doesnt wants to show the list from the Database in the Listbox...
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DBPicturename.SelectedIndexChanged
myConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = U:\VB_assign.mdb"
myConnection.Open()
myDataAdapter = New OleDb.OleDbDataAdapter("Select * From Pictures", myConnection)
mycommandbuilder = New OleDb.OleDbCommandBuilder(myDataAdapter)
myDataAdapter.Fill(myTable)
End Sub
regards kaly
|
|
|
|
|
Did you bind the listbox to the appropriate column in the dataset?
|
|
|
|
|
yes I did, the column name for the pictures name is "pictures"
|
|
|
|
|
Hi I just tested with an textbox instead of an listbox.. it seems that the code works only with the Textbox and not with an listbox..
regards kaly
|
|
|
|
|
My reports take about 30 seconds to load, how do i create a message box that
is displayed during that time period and dissapears when the report loads????
|
|
|
|
|
|
What code do i put behind the progress bar?? Any? Ive never used one
|
|
|
|
|
If your using CrystalReports for your report, it doesn't report progress as the report loads, so displaying an actual progress won't work. Your "progress bar" could be as simple a a moving box, or whatever, incremented by a Timer Tick event.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi Everyone,
I stuck on trying to figure out how to accomplish my task, which is build a string search that calls back all tables that contain the given string. This is what I have so far:
Step 1: I have a public method that the value is pass. I then go to step 2
Step 2: CheckTable which takes the value of the table name and fieldvalue - however I get an error message stating that a datareader is open. I'm not sure how to handle this.
Class Object:
Public Function OracleValueFinder(ByVal FieldValue As String)
Dim SQLTable As String = "SELECT table_name FROM user_tables ORDER BY table_name"
oConnection.Open()
Dim oCmd As New OdbcCommand(SQLTable, oConnection)
Dim oDR As OdbcDataReader = oCmd.ExecuteReader
While oDR.Read
checkTable(oDR(0), FieldValue)
End While
oDR.Close()
End Function
Public Sub checkTable(ByVal TableName As String, ByVal FieldValue As String)
Dim length As Integer = 0
Dim SQLColumn As String = "SELECT column_name FROM user_tab_columns " & _
"WHERE table_name = '" & TableName & "' " & _
"AND data_type = 'VARCHAR2' " & _
"AND data_length >= " & length & " " & _
"ORDER BY column_id"
Dim oCmd As New OdbcCommand(SQLColumn, oConnection)
Dim oDR1 As OdbcDataReader = oCmd.ExecuteReader
While oDR1.Read
CheckColumn(TableName, oDR1(0), FieldValue)
End While
oDR1.Close()
End Sub
Public Sub CheckColumn(ByVal TableName As String, ByVal columnName As String, ByVal FieldValue As String)
Dim sSQL As String = "SELECT COUNT(*) FROM " & TableName & _
" WHERE " & columnName & " LIKE '%" & FieldValue & "%'"
oConnection.Open()
Dim oCmd As New OdbcCommand(sSQL, oConnection)
Dim oDR3 As OdbcDataReader = oCmd.ExecuteReader
While oDR3.Read
Console.WriteLine(oDR3(0) & " - " & oDR3(1))
End While
End Sub
End Class
Thanks,
|
|
|
|
|
Well, I'm not familiar with Oracle, but if I were using MS SQL Server, I'd write the entire search process in a stored procedure that accepts the search string as its only parameter, and returns the results in a single result set. This would avoid having to submit multiple queries over the ODBC connecton, as well as simplify everything.
|
|
|
|
|
The issue I'm facing with this is that the company policy is you are not allowed to write stored procedures for this Oracle database. I've written stored procedures for both Oracle and SQL Server for this task. I have to use .NET for this task.
Thanks,
|
|
|
|
|
Hello there
I need to put the background image on Treeview / list view. if any one has the code would be highly appreciated..
Best Regards
Rizwan Bashir
|
|
|
|
|
Not supported by the standard controls. It can be done, but it isn't pretty to look at. If you have to scroll the control, the image moves with the scrolling tree. It can be forced to be stationary, but then the scrolling flickers like mad, and double-buffering doesn't help.
Is it really worth this kind of effort to get a pretty picture? Best bet is to use a 3rd party TreeView control that properly supports a background image.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I need to develop an exe that will new letters to hundreds of users through email.Through SMTP service i was able to send mail to our domain only but not to others such as yahoo id etc.
Could u pls give me some suggesstions.
Thanks
Mahesh
|
|
|
|
|
This is probably because your ISP won't allow it, because what your doing is considered "spamming". Relaying is most likely turned off. Since your ISP probably won't let you setup your own email server inside their network or use their servers for your "spam", you'll have to use an outside email server to do this. If you find one, it's easy to setup the SMTP server property in your to to use that server instead.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for your suggestion
|
|
|
|
|
I have a VB.NET windows application where I want flat controls with a custom colour border.
To achieve this I am creating a control library to override the standard controls, like TextBox and ListBox.
I have created the desired TextBox that I want by Overriding the WndProc and catching the &HF message. I can then draw a rectangle around the perimeter of the control using whatever colour pen I choose. I only do this drawing if the TextBox border style has been set to fixed single, then provide a custom property to set the desired border colour to draw over it with.
The problem I have is doing the same with the ListBox, if the border style is set to fixed single, when I draw round the perimeter of the control, it draws within the border, which means I always see the outer black one. I can get the desired effect by setting the ListBox's boder style to none, as it then draws the perimeter inside the control and looks like the border. The problem is then when I select an item in the ListBox, and the selected item draws over the custom border. Is there anyway of drawing over the fixed single black border, or do I have to continue using border style none and redraw the border every time after draw item has happened to put it back again?
Any help on this matter would be appreciated.
Jason
|
|
|
|
|
Hello Jason
I might not be able to help you but may be you can help me by sending the code of textbox border color. which I am looking for..
I shall be thankful to you for your support
my email is
rbashir@gmail.com
|
|
|
|
|
Hi all !
I am building a form in VB.net. The function of this form is get all data from one table in Oracle Database and export or write into Fox format. The table in Oracle Database is very large. When I using the following :
With cm
....
.Parameters.Add("bg", OracleType.Cursor).Direction =
ParameterDirection.Output
end with
adp.SelectCommand = cm
adp.Fill(dataset, "bill_detail")
but this command execute very very low. I need all data from the table (about 20 million rows), how can I do ??
Pls, help me !
|
|
|
|
|
Hi,
A few things, are you only querying the database? Is this application an intranet/exrtranet or internet application? If intranet why not use a string to build your sql instead of a stored procedure?
Is this a one time export, how about doing the intial export within Oracle create a flat to export to Foxpro(I believe) and then create a a procedure that will only replace or add new records going forward. I don't know your server threshold but 20 million rows seems like an awful lot and multiple this times the number of columns could be a monster.
Hope this helps!!
|
|
|
|
|
Joe Contreras wrote:
why not use a string to build your sql instead of a stored procedure?
SMACK! Being on an Intranet is no excuse for being lazy and cutting this corner! SQL Injection attacks CAN and DO originate from inside corporate networks, not just the Internet.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
My mistake for not being clear or making that statement. Using the query would be use for troubleshooting, i.e. to determine if the issue is in the stored procedure. That's all I meant when I said to use a SQL query. You need to look at all avenues when you run into issues like this and I don't know how the sproc code base looks like. I'm just wondering why millions of records are being returned.
BTW I've been in some shops where they don't allow writing any objects (sprocs,views) to the Oracle database, SQL is the only option.
Thanks,
|
|
|
|
|
Hi,
I have nearly the same situtation. Here are some things you can try out:
1. Use ODP.Net (coming with any 9 or 10 oracle db) instead of the in-built Oracle provider of the .net framework. Its by far faster.
2. If you switched to OPD.Net consider changing numeric fields to the new binary field types (coming with oracle 10) like 'BINARY_FLOAT'. They reduce the datasize and thus the time needed to transfer the data.
3. Rethink if you really need all the data in one big DataTable. I dont think any user will look into all your data. Consider using a DataReader instead.
|
|
|
|