|
use google..ul easily find the solution..
|
|
|
|
|
|
Kumaran 21st Century wrote: but not windows task scheduler
Kind of odd considering that's exactly what the Scheduler is for...
Your app with then have to be running 24 hours a day. This would probably require you to write your code as a Windows service. Your app would create a Threading Timer, NOT a Form's based Timer. Set it for 60 seconds. When the timer wakes your code up, just check the current time against the scheduled time, hour and minutes only, not seconds. When the two match, fire off your email code.
Or, you could skip the service crap and keep your code simple by not worrying about the timer. You've probably got it mostly written already. Then all you have to do is setup the launch job in the Windows Scheduler.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave Kreskowiak wrote: Or, you could skip the service crap and keep your code simple by not worrying about the timer. You've probably got it mostly written already. Then all you have to do is setup the launch job in the Windows Scheduler.
I second that.
You can only be young once. But you can always be immature.
- Dave Barry
|
|
|
|
|
Kumaran 21st Century wrote: I want to send the details everday at 6.00 P.M. Using VB.NET, but not windows task scheduler.
I've never understood why anyone would want to reinvent the wheel
Steve Jowett
|
|
|
|
|
i am working in VB.NET 2003.
Doubt:
In the same project i am using module and window forms templates.
consider,
module name: mMainmodule
window forms name : frmLogin
i have written the following function in mMainmodule.
Public Function Main(ByVal CmdArgs() As String) As Integer
This function is not firing in any case(before/after frmLogin).
Can you tell me what things i need to change.
nithyaganesh
|
|
|
|
|
you need to relate your code to an event the convention of "MAIN" dosnt apply here. If you want to execute when form loads you need to select the load event from the right pulldown, it will create a
private sub frm_load(...)handle event form_load <--they create this
put your code here
end sub
There may be 100 events you can choose from
Djm
|
|
|
|
|
or change your start up to the code in module???
|
|
|
|
|
If your looking for your Main sub to run at startup just go in "project" menu... "yourApp Properties..." and change the "Startup Object:" to "Sub Main" or to what ever form your want to be the first to load.
Hope this helps
Rob
|
|
|
|
|
how i can do video streaming?
Ali Rana
|
|
|
|
|
DirectShow. If you'd googled it, you'd probably have found pages with links to download it, as well.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hi,
How to Auto fit the column width of data grid depending upon the number of characters in a cell of a row?How to get the pixel width of column ? I want to know if each characters will have different pixel size.
Ex Empname="SARESH". How many pixels this data will take? Here the empname will change dynamically depending upon the data fetched from the query.
Waiting for an early response.
Thanks
Riz
|
|
|
|
|
The MeasureString function of the Graphics class might provide some help.
Shreekar
|
|
|
|
|
Hi
Thanks for ur help..... I tried the MeasureString function of the Graphics class but am not getting the required output. Ireally dont knw how to go abt in doing this. If u knw any such code then plz let me knw.
regards,
Riz
|
|
|
|
|
As an aside, since you are using .Net and assuming this is a desktop app, the DataGridView control has AutoSizeColumnsMode and AutoSizeRowsMode properties in the Layout section which you can tweak to get the desired result.
Shreekar
|
|
|
|
|
Thanks for ur response
I think u r talking abt Visual Studio .Net 2005. I am using 2003 Version. So my datagrid does not have any AutoSizeColumnsMode and AutoSizeRowsMode properties in the Layout section. And yes it is a Windows Application.
Can u sugest me any other solution to this problem.
Regards,
Riz
|
|
|
|
|
I am populate a combobox when they type each letter, so as they type a each letter words that apply to each letter is populated in the combobox, but I am having a problem when I clears it while they are typing it starts back at the begining so instead of them typing "abc" it goes "cba". Does anyone know how to make it so it doesn't do that?
Here is sample of my Code:
Title = ComboBox1.Text
FileOpen(1, "/Titles.txt", 1)
ComboBox1.Update()
ComboBox1.Items.Clear()
Do While Not EOF(1)
Input(1, Titles)
If Title.ToUpper = Mid(Titles.ToUpper, 1, Titles.Length) Then
ComboBox1.BeginUpdate()
ComboBox1.Items.Add(Titles)
ComboBox1.EndUpdate()
A = True
End If
Loop
FileClose(1)
|
|
|
|
|
Sorry, but I'm not to sure what the problem is. But here's how you add text to the ComboBox, and then remove it (if that's what you need).
'Add text
ComboBox1.Items.Add(TextBox1.Text)
'Remove text
ComboBox1.Items.Clear()
Hope this is what you needed.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
Perhaps set the combobox to sort the list, i thinke the property is sorted = true . If that doesn't work, clear and repopulate the list from the original source.
Posted by The ANZAC
|
|
|
|
|
Hello,
In my form frm1 , I display certain information from a query in a datagrid. I have set up a hittest to allow the user to click the first column of any record, which would then open frm2 , which would display all of the details for the selected record. I set up a variable on frm2 , so it's ready to receive the information I pass it. The problem is, I can't figure out how to pass it the needed information, which would be the data in one of the columns of the selected cell. Here's the code:
Private Sub dbgStock_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles dbgStock.MouseDown<br />
<br />
Dim pt = New Point(e.X, e.Y)<br />
<br />
Dim hti As DataGrid.HitTestInfo = dbgStock.HitTest(pt)<br />
<br />
If hti.Type = DataGrid.HitTestType.Cell Then<br />
<br />
If hti.Column = 0 Then<br />
Dim frmDetails As New frmDetail<br />
frmDetails.ID = "no idea what I need to put here"<br />
<br />
End If<br />
<br />
End If
What code should I insert for frmDetails.ID?
Any help would be appreciated. Mike
|
|
|
|
|
I am sorry if this is a redundant question. I have searched messages in the SQL and Visual Basic .net message boards and have not seen complete code example for setting up connections before executing a query which joins two(or more) tables and each table exists in a different database but on the same server.
I am aware of the naming convention ServerName.DatabaseName.TableName.Column
I am aware of populating datasets in vb.net as exemplified below
-------------- Begin populate dataset example -----------------------
Dim DataSetForReport As New DataSet
Dim BlueConnection As String
Dim BlueSQLConn As SqlConnection
Dim BlueQuery As String
Dim i, TotalRowsReturned As Integer
BlueConnection= "uid=test;password=snow;dtabase=DataBaseBlue; server=Spock"
BlueSQLConn = New SqlConnection(BlueConnection)
BlueSQLConn .Open()
BlueQuery = "Select Table1.ColumnA, Table2.ColumnB from Table1, Table2 where ColumnA=ColumnB"
Dim SqlDataAdapterForPopulateDataTable As New SqlDataAdapter(BlueQuery, BlueConnection)
i = SqlDataAdapterForPopulateDataTable.Fill(DataSetForReport, "TableOfData")
SqlDataAdapterForPopulateDataTable.Dispose()
SQLConn.Close()
If i > 0 Then
'query returned at least one row
TotalRowsReturned = i
End If
-------------- End populate dataset example -----------------------
Goal: to be able to change BlueQuery variable to refer to two different databases - DataBaseBlue and DataBaseRed like something below...
BlueQuery = "Select DatabaseBlue.Table1.ColumnA, DatabaseRed.Table2.ColumnB from DatabaseBlue.Table1, DatabaseRed.Table2
where DatabaseBlue.Table1.ColumnA=DatabaseRed.Table2.ColumnB"
If I create another connection like
RedConnection = "uid=Red; password=Car; dtabase=DataBaseRed; server=Spock"
and use it in an addition SQLConnection declaration
Dim RedSQLConn As SqlConnection
RedSQLConn = New SqlConnection(RedConnection)
RedSQLConn.Open()
How do I enable/pass SqlDataAdapterForPopulateDataTable variable two different connections? Or how do I accomplish the "Goal" in another way?
Thanks for any suggestions.
tanya
|
|
|
|
|
You can't change the query to work on two different databases at the same time.
In theory, you can probably get data from two different databases into the same DataSet using two seperate connections and queries. Just make sure the data ends up in two different DataTables in the DataSet. You should be able to put together a DataRelation object that joins the two tables, do your work on it, then use two the two different DataAdapters and their connections to write those two tables back to the databases if you've made any changes.
Sorry, I don't have any examples. I've never done it myself. You can find the docs on DataRelation here[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave,
Thanks for taking the time to share your thoughts. I was trying to avoid two separate datatables but if that is the only way, then that is the only way.
I know there are good/great technical people at Microsoft. However, I would think this is a common enough situation that a method/tool/wrapper would have been added to be able to handle a single query referencing two or more tables in two different SQL Server databases. My two cents.....
tanya
|
|
|
|
|
tanya foster wrote: I would think this is a common enough situation that a method/tool/wrapper would have been added to be able to handle a single query referencing two or more tables in two different SQL Server databases.
It may be possible to do with a stored procedure, but not with any code on the client side that I know of. You might want to post the question in the SQL Forum[^]. There's a guy in there, Colin Angus Mackay, who knows FAR more about SQL Server than I do.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
I have the task to read excel spreadsheets with vb.net. Amongth other details the contain checkboxes, from which I need the value.
Has anyone got an idea how I should read these checkboxes?
|
|
|
|