|
How can i get a number incremented ech time i click a button n that number should be displayed in a label.
The number should start from 1 daily and should be incremented when that button is clicked and next day it should again start from 1.
Kindly Help Me
With regards
Withe Regards
Alok Singh
|
|
|
|
|
Save the number with the date where your app can access it (textfile, registry, app.config, etc.), convert it to integer and then add 1 to it. When the app starts it compares the date and value from the stored value & increments.
|
|
|
|
|
Hi to all, I am Jayachandra,
I am learning VB 6. Now my problem is Data Reports. I am getting the report on the basis of user request for the first time only. But when i try for another record I am getting an error message like...
Msgbox "Operation can't process as the object is already open". Please solve this problem. Here I am using Access as backend. IN Dataenvironment i have selected SQL Statement in properties of the command. I have written the sql statement as-- select * from tablename where columnname=?
Please help me anybody I would be thankful to you.
Jayachandra
-- modified at 9:01 Tuesday 10th October, 2006
|
|
|
|
|
Hi
I am working on a 'SCHDULER APPLN' in VB. Net. Appln itself has a scheduler.
I want to share these schedule to Outlook using Google Calendar feature.
If any body knows how to implement these pls help me. Any help will be appreciated.
I refer this link http:://code.google.com/apis/gdata/calendar.html. I couldn't do more.
|
|
|
|
|
hi
i am devloping a report. I need to create a report (Crystal reports) to generate the report. the problem i am facing is that i am not able to print reports. What is the solution to this......
But report is opening n i can see that.
I want to know how can i print it directly??
Kindly help me
Withe Regards
Alok Singh
|
|
|
|
|
Dear all,
We have a system wherein an output file is generated by some other program other than .Net.The output file is a textfile.Now we have to upload this textfile into the client's server through ftp(or whichever way its possible)using vb.net.
Can u please suggest me some code on this.PLEASE..deadline's just ahead.
thanks in advance,
Preethi.
preethishivbaba
|
|
|
|
|
Hi,
You can actually create a windows service with filesystemwatcher, which keeps watching the creation of any new text files.
The code within the windows service looks something similar to the below:
Protected Overrides Sub OnStart(ByVal args() As String)
InitializeEventLog()
InitializeFileWatcher()
InitializeMailServer()
End Sub
In the InitializeFileWatcher, specify the ftp folder path and add an event handler,
Private Sub InitializeFileWatcher()
fsWatcher = New FileSystemWatcher
fsWatcher.Path = "\\FTP\Folder\*.txt"
fsWatcher.NotifyFilter = (NotifyFilters.DirectoryName Or NotifyFilters.FileName)
fsWatcher.IncludeSubdirectories = True
'watcher.NotifyFilter = NotifyFilters.FileName
'watcher.NotifyFilter = NotifyFilters.DirectoryName
' Only watch text files.
fsWatcher.Filter = "*.txt"
' Add event handlers.
AddHandler fsWatcher.Created, AddressOf OnTextFileCreated
' Begin watching.
fsWatcher.EnableRaisingEvents = True
End Sub
so, in the OnTextFileCreated sub procedure, load the data from text file to the local server
Private Sub OnTextFileCreated(ByVal source As Object, ByVal e As FileSystemEventArgs)
'Code for loading text data to local server-database
End Sub
So, whenever there are new text files created in the specified FTP folder, the event is raised and the text file data is loaded to the server.
Vidya
|
|
|
|
|
Vidya,
thanks a lot.I am gonna try this and get back to you.
Preethi.
preethishivbaba
|
|
|
|
|
i want to know how to connect tk solver with vb and access the same with vb code........
can anyone help me on this...........its really urgent
-- modified at 6:53 Monday 9th October, 2006
|
|
|
|
|
hi
i want to copy data of one table to another table
and get backup from database
my database is access
i dont find any sample about it
please help me
|
|
|
|
|
Do you want to copy data to another table inside the existing database or back it up to a separate database? Are you simply going to append the data to a table whose structure has been defined in a prebuilt database or do you need to create the database and it's tables from scratch?
More info needed before we can help.
|
|
|
|
|
hi
i want to copy first:
data from table to another table inside the existing database and then back database up to another place
i want to append the data to a table whose structure has been defined in a prebuilt database.
please help me
|
|
|
|
|
Hi,
I Have a window 2003 server machine. I Installed visual studio.NET 2003 on my machine.
In Microsoft visual studio .NET 2003 a error is occured ,
when I want to create a new project in ASP.NET Web
Application visual studio .net has dected that the web
server is runing ASP.NET version 1.0.
The web application you are creating or opening can be
configured to be complaint with ASP.NET 1.0 .
however , the application will not able to use new
features from ASP.NET 1.1 .
So I can't work on my machine for Dot Net .
Plz sugess me for this .
Thanks all off u .
nilesh
|
|
|
|
|
Nilesh
Have you installed 1.1. of the framework on the Server? Or am I miss reading and the server and deveopment machine are the same box?
Cheers
tom
|
|
|
|
|
Can somebody help me to get the code for how to import excel sheets to MS SQLServer through VB Programming and how does it identify the row and columns of the excel sheets in the database.
need help urgently
Neha
|
|
|
|
|
I have a question that I was hoping someone could help me with. I am using VB.net 2005 express edition with SQL Server 2005 Express edition.
I have a database that has a table in it called Folder. It consists of two fields. One is called folderId and folderName.
I want to add a new row to this folder by calling a second form from my main form. For example, say I open up a second form from my main form. This second form consists of a text box and an button called OK. The user will enter the new folder name into the text box. How do I make it so the name the user enters into the text box is added to the folder table.
|
|
|
|
|
Hi,
I think u need to use sql command to done it..
Example:
public sub OK_Click (byval sender as object, ByVal e As System.EventArgs)handles OK.click
Dim cmd As New Data.OleDb.OleDbCommand
cmd.Connection = mssql
'Sql command Save....
example:
<br />
cmd.CommandText = "INSERT INTO [Folder] (FolderID, FolderName) "<br />
cmd.CommandText &= "VALUES ('" & me.txtFolderID.text.trim & "','" & me.txtFolderName.text.trim & "', "<br />
Execute SQL
<br />
Try<br />
cmd.Connection.Open()<br />
cmd.ExecuteNonQuery()<br />
Catch ex As OleDb.OleDbException<br />
msgbox(ex)<br />
finally <br />
connection.close()<br />
end try<br />
i hope it can be help
|
|
|
|
|
Best way to do it IMHO is through making use of datasets and table adapters.
First you need to create a dataset. To do this
1. Right click over your solution name and select "Add new item..."
2. Click on "Dataset" & give the dataset a meaningful name (in this example I'm using the name dsFolder).
3. The dataset will be created and a wizard will open to help you configure your table adapter.
4. Configure your table adapter to use the same connection string (saved in the My.Settings file), click "Next" & use the query builder to add your table to the table adapter.
5. Add the fields from your table by checking their checkboxes. Remember to include the primary key from your table so that the table adapter can automatically generate update statements for you.
6. Click "Next" & "Finish".
In your main form add this code to whatever event it is that opens your form:
Dim frm2 as New Form2
frm2.Show()
'use ShowDialog() if you don't want users to close
'the form before completing process.
Then in your second form add
Option Strict On
Imports System.Data
Imports System.Data.SqlClient
to the very top of the code editor. Add the code below to the OK button's click event (the naming in your code will probably be different but you get the idea),
Private Sub btnOK_Click(...)Handles btnOK.Click
'create new datasets and table adapters
Dim dsFolder1 As New dsFolder
Dim daFolder As New dsFolder.FolderTableAdapter
'create a new row to add to the table
Dim dr As DataRow = dsFolder1.Folder.NewRow()
'try updating the database
Try
dr("folderName") = txtFolder.Text
'add the datarow to the dataset
dsFolder1.Folder.Rows.Add(dr)
'update the database
daFolder.Update(dsFolder1)
Catch ex As Exception
Messagebox.Show(ex.Message)
End Try
End Sub
Using this kinda practice is better because the datasets and table adapters add type safety to your code, make it more readable as well as gives you objects that you can reuse later on in your code. This comes in really useful when you work on large databases.
Also. make use of Try...Catch...End Try blocks. The structured error handling ability of .NET is tool worth using. You could go even further by implementing TraceListeners to write out performance data & errors from your code to a log file, which can only help you write better code.
Sorry, for the long-winded explanation, I've had WAAAAY too much coffee this morning...
|
|
|
|
|
kulazfuk,
Thanks you so very much for your help. I was playing with something like this last night, but you clued me in on some other ideas. Thank you very much.
It still is not working for me though. I could not create a table adapter with the line
Dim daFolder As New dsFolder.FolderTableAdapter
I used Dim daFolder As New FolderTableAdapters.FolderTableAdapter
Everything else is the same, but it does not work.
|
|
|
|
|
Well, like I said before your naming conventions will probably be different so what you gotta look at is creating a table adapter for the dataset that you previously created. it'll follow a Dim VariableName As New DatasetTableAdapter.TableName type pattern.
That should sort you out.
|
|
|
|
|
Hi,
May i know how to uncheck the show clock in taskbar properties when my system on loading.
|
|
|
|
|
You have to use the Win32 API for that.
|
|
|
|
|
That doesn't look like a complete connection string, but the method might add things to it before it uses it. Look up the documentation for the method to see what it expects.
---
b { font-weight: normal; }
|
|
|
|
|
No, a DSN is a Data Source Name. A DSN can be a User DSN or a Machine DNS, and contains settings for a database connection. You access the data sources from Administrative Tools in the start menu.
---
b { font-weight: normal; }
|
|
|
|
|
Hi I am using vb.net2003,
Does anyone know any code I can use to delete files in a folder as well as the folder the files are located in?
Thanks for any help
|
|
|
|