Pgmer 50 Master Poster Featured Poster

Mr Waqas Aslam
I also suggested the same. let him/she try it out.

Pgmer 50 Master Poster Featured Poster

What is difficulty in using the controls? They would have given the help files or vedio with controls. check out those.. And they have forum also check out the forum and discussion board.

Pgmer 50 Master Poster Featured Poster

What is the error message? Why cant u take the Query before running cmd.ExecuteNonQuery() and try to run on SQL server?

Pgmer 50 Master Poster Featured Poster

Syntax for insert into is as below

INSERT INTO TABLENAME(
					COLUMN1,
					COLUMN2,
					COLUMN3,
					)
			 VALUES(VALUE1,
					VALUE12,
					VALUE13,)
Pgmer 50 Master Poster Featured Poster

Whay using AND?

Pgmer 50 Master Poster Featured Poster
Pgmer 50 Master Poster Featured Poster

Then kill the process which u want.. What is the problem now?

Pgmer 50 Master Poster Featured Poster

Yes oxiegen correct, in web cant use msgbox. U can use alert in javascript.

Pgmer 50 Master Poster Featured Poster
If fileExtension.Equals(".xls") = True Then'some code here else'some code hereend if

what is the problem with this code? you want to make genreal function to check or validate .xls?

Pgmer 50 Master Poster Featured Poster

CodeOrder, Yes we can use that. Thanks :)

Pgmer 50 Master Poster Featured Poster

Are you associating the process by creating an instance to it? If yes you should be able to kill it.

Pgmer 50 Master Poster Featured Poster

Yep, I am using fileUpload

Is it web application? Can you please post your code here what you have so far?

Pgmer 50 Master Poster Featured Poster

If ur opening through program then you can try something like this

Private Function isFileExcel(ByVal filename As String) As Boolean
        Try
            Dim fileExtenstion As String = String.Empty
            fileExtenstion = filename.Substring(filename.IndexOf(".", 1))
            Select Case fileExtenstion
                Case ".xlt"
                    Return True
                Case ".xls"
                    Return True
                Case Else
                    Return False

            End Select
        Catch ex As Exception
            Msgbox(ex.Tostring())
            Return false
        End Try
You need to include all the formats of excel in case statement.
Pgmer 50 Master Poster Featured Poster

Why cant you force the user to select only excel file? using fileopen Dialogue?
are you opening the file through program not using fileopen Dialogue?

Pgmer 50 Master Poster Featured Poster

Below is the code for selecting or browsing the image file. i have just mentioned jpg for example u can include what all u want.

Dim fBrowse As New OpenFileDialog
        With fBrowse
            .Filter = "Image files(*.jpg)|*.jpg|All files (*.*)|*.*"
            .FilterIndex = 1
            .Title = "Load image file"
        End With
        If fBrowse.ShowDialog() = Windows.Forms.DialogResult.OK Then
             'Do what u want to do..
         End If
Pgmer 50 Master Poster Featured Poster

are u initializing the dr? and check dr has rows to read.

Pgmer 50 Master Poster Featured Poster

U want to stop the application which u ran using the process.start?

Pgmer 50 Master Poster Featured Poster

Then follow what pritesh2010 told or My last post. Where ur getting struck?

Pgmer 50 Master Poster Featured Poster

Convert.tostring() will handle the null values but .string() will not handle nulls.

Pgmer 50 Master Poster Featured Poster

U need to add the required component for crystal reports at client system. So u needs to include them in prerequisites in ur project and why you want to install the SQL at client end? it should be server and ur client should point to server.

Pgmer 50 Master Poster Featured Poster

Or you can have Updated by, updated time, inserted by, inserted on in each table which you want to have log for..

Pgmer 50 Master Poster Featured Poster

You need to set that trhough code..
datagridview1.Coloumns(0).cell(0).value="" some thing like this.. this is not the excact syntax...

Pgmer 50 Master Poster Featured Poster

ur asking for login details or Event details? u want to capture all the events done by user in ur application?

Pgmer 50 Master Poster Featured Poster

You can have primary key column in database with autoincrement 1 to it. and fecth from db. it would be easy to do and also maintain ur data in DB.

Pgmer 50 Master Poster Featured Poster

That can be done.. But how ur calculating the how much quantity of Pizza has been taken or pepsi has been taken? Can you share ur code?

Pgmer 50 Master Poster Featured Poster

Dim strCnn As String = "Persist Security Info=False; Data Source=”Your Server name”;UID=”User Id”;PWD=”Your Password” ;Initial Catalog=Databse to connect;"
You can write connection string in Appconfig file or Classfile..
Insert query always good to have in stored procedure than in ur code..

Pgmer 50 Master Poster Featured Poster

This is what ur looking at?

Dim sSaveFile As New SaveFileDialog
        With sSaveFile
            .Filter = "Text files(*.txt)|*.txt|All files (*.*)|*.*"
            .FilterIndex = 1
            .Title = "Save as textfile"
        End With
        sSaveFile.ShowDialog()
Pgmer 50 Master Poster Featured Poster

If ur thread is solved then plz mark the thread as solved...

Pgmer 50 Master Poster Featured Poster

Dude... ur not telling ur problem... without knowing ur problem no one can give sollution .

Pgmer 50 Master Poster Featured Poster

Show the price for item in textbox and ask the user to enter the Quanity he wants then
TextBox8.Text =Quantity*Actualprice..

Pgmer 50 Master Poster Featured Poster

Which data base are u using?

Pgmer 50 Master Poster Featured Poster

Where is ur code to bind the records to combo? how ur setting the display and value member?

Pgmer 50 Master Poster Featured Poster

Where ur saving the passwords? U need to compare the Entered username and password and You can show by either alert in javascript or thorugh label on web page...

Pgmer 50 Master Poster Featured Poster

what u want to control?? Can u plz explain ur problem in details?

Pgmer 50 Master Poster Featured Poster

See if this helps u...

Try
            Dim starttime As New DateTime
            Dim endtime As New DateTime
            Dim duration As New TimeSpan
            endtime = DateTimePicker2.Text
            starttime = DateTimePicker1.Text
            duration = TimeValue(DateTimePicker2.Text) - TimeValue(DateTimePicker1.Text)
            Dim Dur As Integer = duration.Hours
            Dur = (Dur * 60) / 30

            For i As Integer = 0 To Dur - 1

                cmbTime.Items.Add(starttime.ToString)
                starttime = starttime.AddMinutes(30)
            Next

        Catch ex As Exception

        End Try
Pgmer 50 Master Poster Featured Poster

Before executing take the query and run in sql server so u will come to know where the syntax is going wrong..

Pgmer 50 Master Poster Featured Poster

What is ur sollution ? And if it solved then plz mark the thread as solved..

Pgmer 50 Master Poster Featured Poster

Please mark the thread as solved if it solved...

Pgmer 50 Master Poster Featured Poster

ds.tables("employees").row(0).item("id") only one row ur checking? Cant u validate at the back end? by just sending ur employee id as parameter?

Pgmer 50 Master Poster Featured Poster

What is ur problem? or where is the probelm?

Pgmer 50 Master Poster Featured Poster

if windows application you need to install the framework on the user machine. Which ur application needs in run time...

Pgmer 50 Master Poster Featured Poster

Dear kaleemafridi,

Please open new thread. do not post in someone else post.. And check ur posting in approiriate forum. This is for vb.net not ASP.NET.

Pgmer 50 Master Poster Featured Poster

U cant make exe from web app. DLL's or ASPX pages have to be moved to the Server and you need to set the virutal directory for the application in IIS.

Pgmer 50 Master Poster Featured Poster

you can do this in ur select statement from SQL while loading the data...

SELECT Active= convert(bit,0),* from ur table name
Pgmer 50 Master Poster Featured Poster

New development is very rarely developed using vb.net.. So better start with C#. it helps in long run.. Its not difficult to learn. Once ur used to vb.net then it will be difficult to swicth to c#.. Choice is urs.. :)

Pgmer 50 Master Poster Featured Poster

If ur problem is solved then please mark the thread as solved... :)

Pgmer 50 Master Poster Featured Poster

i vote for C#. If ur staring then start with C#... :)

Pgmer 50 Master Poster Featured Poster

Did u declare the below variables?
Dim saveImage As IO.MemoryStream
Dim imgByte As Byte()

Pgmer 50 Master Poster Featured Poster

This piece of code
saveImage = New IO.MemoryStream(imgByte)
pb.Image = Image.FromStream(saveImage)
works fine for me... you only can debug ur code to fix the error

Pgmer 50 Master Poster Featured Poster
Dim intImage As Integer = 0
        If ds.Tables.Count > 0 Then
            For intImage = 0 To ds.table(0).rows.count - 1
                imgByte = ds.Tables(0).Rows(intImage)("Emp_Image")
                saveImage = New IO.MemoryStream(imgByte)
                PictureBox2.Image = Image.FromStream(saveImage)
            Next

        End If

And also check isdbnull value for ur image data.