|
Dave Kreskowiak wrote: I have some grass that needs cutting
shure when I'm in the neihberhood
Dave Kreskowiak wrote: my truck needs an oil change
I can try but will not be held responsible for any accidents like accidently setting you'r truck on fire
Dave Kreskowiak wrote: refinishing the floor in a bedroom and painting
shure but I pick the colors
Dave Kreskowiak wrote: I mean, since you're doing his homework for him and all...
I dought that his homework is only sending a mail (if it is I wish I went to his school). But you'r right I should have pikked up on that. Anyway I had the code written in one of my projects so I took me all but 3min to do the post but still 3min to much.
I'll go beat myself up now for not spotting this (normaly I'm better at spotting homework questions, guess he got lucky and got me on a weak moment)
-- modified at 3:34 Thursday 25th October, 2007
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|
|
TDDragon wrote: dought that his homework is only sending a mail (if it is I wish I went to his school). But you'r right I should have pikked up on that. Anyway I had the code written in one of my projects so I took me all but 3min to do the post but still 3min to much.
I'll go beat myself up now for not spotting this (normaly I'm better at spotting homework questions, guess he got lucky and got me on a weak moment)
It happens. I've caught myself doing the same thing, and I usually beat myself up like this too.
TDDragon wrote: The only way we learn is by making mistakes.
That's what going to University is for!
|
|
|
|
|
Dave Kreskowiak wrote:
TDDragon wrote:
The only way we learn is by making mistakes.
That's what going to University is for!
making mistakes or learning
true going to university is good but I'v learned more in the 9 months now that I'v been working than my 4 years in university
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|
|
thanks a lot
your help is helpfull,
but I have a question more about this topic: can I let the message content be the result of some calculation with in my system(programm)?
to contain a chart for example?
Best Wishes
Knowledge student
There is always something to learn
|
|
|
|
|
Hi,
I am a very beginner in ASP & VB.NET development
I learnt how to create classes in web site using VB.Net language but I do not know how to use them or even give them the ability to change in the main form(defualt)
Thanks
There is always something to learn
|
|
|
|
|
Seriously, pick up a beginners book on VB.NET and learn the language. Forget ASP.NET for now. It's just adding a layer of comlexity that you don't need right now. Learn the basics of VB.NET, THEN you can move on to adding ASP.NET to your skill set.
|
|
|
|
|
hi all
I have a textbox where i search using a Button. So every time i enter values in a textbox , i have to use a mouse to click a Search button. am looking for a way, where a user can enter text to be searched in a textbox, and after that a "Enter" key to run a Search,i want a way to move focus from textbox to button with Enter key. i tried to google this but i did not know how to to put it, so i decided to post it.
Please send me vb.net Examples.
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
There are two ways, set the form's AcceptButton propert to the search button or in keypress for the textbox:
if e.keychar = chrw(keys.return) or e.keychar = chrw(keys.return) then<br />
me.searchbutton.performclick()<br />
end if
code may be abit wrong but you get the idea.
|
|
|
|
|
Thanks man , Thats nice, can you do the same in the Situation of a Combobox and a Button? , like the textbox used it this way
If Asc(e.KeyChar) = Keys.Enter Then
btnSearch.PerformClick()
End If
The Above code will be in keypress event. in combobox how will achieve this?
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Yeh just throw it into the keypress for the combobox and assign whatever button you want. I think key press has e.handled = true, if not , maybe use key down to avoid undesired affects, say:
On key down:
If e.keycode = Keys.Enter Then
btnSearch.PerformClick()
e.handled = true
End If
Try that.
|
|
|
|
|
You can put the textbox and button in a panel and then set the panels defaultbutton property to the id of the button. Pressing enter in the textbox will then essentially post back as if the button had been clicked
|
|
|
|
|
ah...indeed, that one slipped my mind.
|
|
|
|
|
Thanks man i have use the same code in Keypress of the Combobox ,but changing the name of the Button.
Thanks man
-- modified at 9:46 Wednesday 24th October, 2007
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Hi All,
I would like to develop a tool, which is like Tool Bar Window in MS Visual Studio.NET. Could you please help me for that?
In the tool bar window, we have various categories, like General, Database, Windows Forms, Components. Under each category there are lot of tools are available. It is also similar to the left side tab in outlook in that various sub categories are Mail, Calendar, Contacts, Task, etc. In the same I too want a Tool. Please help me, how should I proceed?
kolags@hotmail.com
|
|
|
|
|
Personally, and some one correct me if i'm wrong, but i think the best approach would be to develop a collapsible panel and within that have a toolbar that stacks vertically with your items, limiting your image sizes to the height of the item and showing text and item. Then for each group, tasks, calender etc, add one of your collapsible panels which, by the way, shouldn't be too difficult to create.
I assume you are making an email program, these might also be useful:
http://www.codeproject.com/cs/miscctrl/outlooklistcontrol.asp
http://www.codeproject.com/vb/net/OutlookBar.asp
|
|
|
|
|
Hi ANZAC,
Glad to see your response,
I got very good idea from your application as a startup to my application, but I couldn’t find few properties for the control (Toolbar button) what you specified in your documentation.
My intention is to develop a tool bar that is work on desktop applications. Preferable technology is VB.NET. I think now you may get an idea what I am search for? Please guide me in the same way.
Thanking you to everyone, that helps me to complete this task.
|
|
|
|
|
yeh really not sure where to head for this one, perhaps do some research and experimentation, my idea has no actual stuff to back it up so your on your own unless someone else can help.
|
|
|
|
|
I am trying to connect to oracle database with the following code in VB.net 2003, but i am not getting anything coming back and dont know what is happening as the catch is not showing any errors the program just keeps running. I have this code behind a button should this code be in form view or elsewhere.
Imports System<br />
Imports System.Data<br />
Imports Oracle.DataAccess.Client<br />
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click<br />
<br />
<br />
''''''''''''''''''''''''''''''''''''''''''''''''''''''''<br />
' Create the connection object<br />
Dim con As OracleConnection = New OracleConnection<br />
<br />
' Specify the connect string<br />
' NOTE: Modify User Id, Password, Data Source as per your database set up<br />
<br />
<br />
con.ConnectionString = "User Id=user_id;Password=user_pword;Data Source=ora9idb;"<br />
<br />
<br />
'''''''''''''''''''''''''''''''''''''''''''''''''''''''<br />
Try<br />
' Open the connection through ODP.Net<br />
con.Open()<br />
Console.WriteLine("Connection to Oracle database established successfully !")<br />
Console.WriteLine(" ")<br />
<br />
<br />
Catch ex As Exception<br />
<br />
Console.WriteLine(ex.Message)<br />
'txtStatus.Text &= ex.ToString<br />
End Try<br />
''''''''''''''''''''''''''''''''''''''''''''''''<br />
'Create command object to perform a query against the database<br />
Dim cmdQuery As String = "SELECT empno, ename FROM emptab"<br />
<br />
' Create the OracleCommand object<br />
Dim cmd As OracleCommand = New OracleCommand(cmdQuery)<br />
cmd.Connection = con<br />
cmd.CommandType = CommandType.Text<br />
<br />
<br />
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''<br />
'Fetch data into an OracleDataReader object and <br />
'display the data on the console. Then, close the connection object<br />
<br />
Try<br />
<br />
<br />
<br />
' Execute command, create OracleDataReader object<br />
Dim reader As OracleDataReader = cmd.ExecuteReader()<br />
While (reader.Read())<br />
<br />
' Output Employee Name and Number<br />
Console.WriteLine("Employee Number : " & _<br />
reader.GetDecimal(0) & _<br />
" , " & _<br />
"Employee Name : " & _<br />
reader.GetString(1))<br />
<br />
End While<br />
Catch ex As Exception<br />
<br />
Console.WriteLine(ex.Message)<br />
<br />
Finally<br />
<br />
' Dispose OracleCommand object<br />
cmd.Dispose()<br />
<br />
' Close and Dispose OracleConnection object<br />
con.Close()<br />
con.Dispose()<br />
<br />
End Try<br />
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''<br />
<br />
End Sub
|
|
|
|
|
Which Oracle client is installed on the workstation?
Which Oracle library are you using in your code??
I'm assuming ora9idb is the name of your database, NOT the server on which it resides. Is ora9idb defined in your tnsnames.ora file??
I don't use Oracle at all, so my ability to support this is quite limited.
|
|
|
|
|
Thanks for helping Dave.
Installed 9i, yes i just changed the code, The problems been sorted now as i can use access instead what a relief as done some last year in VB.net 2003.
I have got the code in VB.Net 2003 but must run it in 2005 VB. What will i require to be able to change the code for this. What is best way? I understand that once you run in 2005 you cannot go back and you cannot edit it 2005, so How do i change the code so it does not have any errors before i run in 2005.
This is more your speciality then.
Oracle is long gone.
|
|
|
|
|
kendo17 wrote: I have got the code in VB.Net 2003 but must run it in 2005 VB. What will i require to be able to change the code for this.
Open the project in VS2005 and it'll get converted automatically. There might be some breaking changes, but the Upgrade Wizard will tell you about more of those.
kendo17 wrote: I understand that once you run in 2005 you cannot go back
True. Once the project is opened up and converted in 2005, you can no longer open it in 2003. But what's stopping you from just making a copy of the project and keeping one copy for each version?
kendo17 wrote: and you cannot edit it 2005
Don't you mean 2003?? You can edit all you want, just don't depend on Intellisense to tell you what's right and wrong. You just can't compile a 2005 project under 2003.
How do you change the code so it opens in 2005 without errors? You don't! You open the project, let it upgrade, then fix whatever breaks.
|
|
|
|
|
When I run this code, only one DDL (cboSDB) populates, the other remains empty. Code does not trip any errors. Am I missing something obvious? Thanks
******************
Using conn As New SqlConnection(connect)
Try
conn.Open()
' get DataTable with all available metadata collections
Dim dt1 As DataTable = conn.GetSchema()
Dim cmd As SqlCommand = New SqlCommand
Dim dr As SqlDataReader
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "sp_databases"
cmd.Connection = conn
dr = cmd.ExecuteReader
cboSDB.Items.Clear()
cboSDB.Items.Add(New ListItem("Select", "0"))
cboDDB.Items.Clear()
cboDDB.Items.Add(New ListItem("Select", "0"))
' bind DataTable controls to display rows
cboSDB.DataSource = dr
cboSDB.DataTextField = "DATABASE_NAME"
cboSDB.DataValueField = "DATABASE_NAME"
cboSDB.DataBind()
' This is where it won't work yet code is exactly the same as above.
cboDDB.DataSource = dr
cboDDB.DataTextField = "DATABASE_NAME"
cboDDB.DataValueField = "DATABASE_NAME"
cboDDB.DataBind()
' End
cmdSConn.Enabled = False
Catch ex As System.Exception
clsE.logWizError(ex.Message.ToString, "COULD NOT CONNECT TO SOURCE.", sClient)
lblMsg.Text = "COULD NOT CONNECT TO DATABASE. PLEASE TRY AGAIN."
lblMsg.ForeColor = Drawing.Color.DarkRed
lblMsg.Visible = True
Finally
conn.Close()
End Try
End Using
|
|
|
|
|
You don't do databinding like this using a DataReader. A DataReader reads through the returned records forward only. Since during the first bind, you had the reader go through all the records once, there's no way to get it to go back and do it again for the second bind.
Drop the DataReader and use a DataAdapter to fill a DataTable, then you can bind both ComboBox's (please don't use abbreviations like DDL!) to that DataTable.
|
|
|
|
|
select convert(varchar(2),datepart(dd,travel_date))from booking_details
this returns me :…….
15
21
24
8
5
But in this o/p I want 08 instead of 8 please suggest
|
|
|
|
|
This is the wrong forum for this question, but one answer might be:
select right('0'+convert(varchar(2),datepart(dd,travel_date)),2) from booking_details
Hope that helps.
Ben
|
|
|
|