M.Waqas Aslam 67 Posting Pro in Training Featured Poster

means there are more then one dataabases you have , ? and you want that your code will update the selected database ? if yes then do something like this

dim con as new sqlconnection("your connection string")
con.ChangeDatabase(comboBox.text) ' you can use combobox.selectedvalue
con.open()
'------------------
here you can use your update command as jim said.
'------------------
con.close()

if this is not your prob then please explain it for me ,

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

yes you can use web browser control in vb.net form and after that you can easily edit the webpage. but for this you have to make your or custom browser.

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

and i also want to add something in jim's comment that in your code you are using 4 cmd objects , 4 dataadapter and 4 datatable , it not good . just use this

cmd as new sqlcommand()
da as new sqldataadapter()
etc

this will reduce your code.

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster
"select * from table1 where @yourDate between hiringdate and contractEndDate and id = @ID

'@yourDate and @ID are the variable fields.

try this , may be this will solve your prob.

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

you can also use textbox text change event for this ,here is an example to in which we have to give qty and price and nettotal will calculated auto.

'use this code on the price textbox's text change event

txtNetTotal.text =val( txtQty.text) * val( txtPrice.text)
M.Waqas Aslam 67 Posting Pro in Training Featured Poster

before coding , i think it is better to analyise your proj , and requirements then start developing database then start coding. , you can find so many hospital management application on net tril version or demo versions , after testing them you can better analyise your application .

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

if your prob is solved please mark this thread solved , regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

please check these links , hope they will help you.
Click Here
Click Here

regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

here are some links , they will help you to take first step
Click Here
Click Here

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

here is query of mssql , i dont know about mysql , it may not work in mysql , but it will give you an idea to solve your prob.

select s.articlenb , a.supplier ,a.cell, s.barcodenb s.barcodedescription s.instock
from stock s
inner join articles a on a.articlenb = s.articalnb
where a.cell = 'Yes'
'if cell field is varchar or text then use 'Yes' and if cell field is boolean type or bit then use 1 and 0

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

just right click on your project , select properties then select compile option then select advance compile option then there will a combobox with value .net 4 Client Profile just select .net framework 4 . you will have crystal report viewer for use :)
if this helped you please vote me up :)

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

just right click on your project , select properties then select compile option then select advance compile option then there will a combobox with value .net 4 Client Profile just select .net framework 4 . you will have crystal report viewer for use :)
if this helped you please vote me up :)

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

in c# this prob occurs when project's framwork is 4.0 framework for client , if we change it with 4.0 framwork then report viewer we can use. try to search how to change the framework of project may this will help you

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

just set the combobox.valuemember = your_field_name , and where you are getting the value of combobox just use this combobox.selectedvalue .

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

you have to add select first your application folder then right click and select add files , browse your project bin folder and add all files present init , after that just add shortcut of your .exe file on desktop build your project ,

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

happy stay at daniweb

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

welcome you :)

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

i think you can rotate image instead of rotating picture box , here is a link , please visit it , there is some sample code to rotate image , hope this will help you
Click Here

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

i think you have to convert your int value first in decimal value and after that make calculations and then just convert your decimal value to string and concatinate it with "%" string.

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

can you please tell me what is your prob , just posting your code is not sufficient to help you , explain your prob so that any one can help you.

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

i dont know much about the list view control , but here is a code to get value of the cell from the datagrid whos checkbox is checked ,

dim myarr as new ArrayList
for i = 0 to datagridview1.rows.count-1

  if datagridview1.item(1,i).value = true then 
     myarr.add(datagridview1.item(0,i).value.tostring())
  end if 

next

this code will return array list , having all the values of the cell whos checkbox is checked. you can get these values by doing this

 for i = 0 to myarr.count -1 
  msgbox(myarr(i).value.tostring) ' i am not sure that is we need to getvalue then convert it into string or directly we can convert to string. please check it by your self as i am not at my home and also not in my office so i have no vs installed here ,
  msgbox(myarr(i).tostring)
 next 

hope this will help you to solve your prob ,

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

as Pgmer said you can use the rowindex to get your last row here is code to get the last index .

dim lastIndex as integer
lastIndex=datagridview.rows.count -1 ' this code will give you the last index of row. 

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

mohanrajan , always start new thread for your new questions.
well yes you can use glass effect on your forms , but for this make sure your application is running on windows 7 , because in windows xp this functionality will not work.

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

can you please tell me your tables fields .so that i can write query for this prob ?

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

you have to add all files present in bin folder of your project ,

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

just right click on your project in solution explorer window and select properties then just change the framework . it works for me in c# . i dont know it works for you in vb or not. or you can also try to add reference ,or just right click on tool box select add choose item then from .net tab select the crystal report viewer. hope this will help you
regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

just right click on your project in solution explorer window and select properties then just change the framework . it works for me in c# . i dont know it works for you in vb or not. or you can also try to add reference ,or just right click on tool box select add choose item then from .net tab select the crystal report viewer. hope this will help you
regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

yes you can join then or use nested select statements ,like this

Customers

custid
custname

Interest

interestid
custid
interestname

now you have to get all the customers who have interest in football , you can do like this .

select c.custid,c.custname ,i.interestname
from customers c
inner join interest i on i.custid = c.custid
where i.interestname = 'football'

and you can do like this also but this is not i recommend for you.

select c.custid,c.custname ,
            (select i.interestname from interest i where i.custid = c.custid and
             i.interestname = 'football') as InterestName
from customers c

the above query is faster then this.
tip: always try to avoid nested select statements in your query as much as possible. nested select statement slowdown your query.

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

please mark this thread solved if your prob is solved

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

i think you can join datatables using Linq queries ,i dont know much about it but you can google it ,

regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

just change this line of code

cmd.CommandText = "Update HallTransaction Set status=@status where ID=@ID"

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

i dont know about the auto width function in crystal report yes you use can grow property of your column , just set can grow property true.

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

are you populating your grid from database ? or there are pre-define rows in your datagrid ?

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

A few are much less violent than others (e.g., Buddhism),

mike_2000_17 , please just google what buddhisit are doing in burma ,:) you will find that buddhism is also very voilent

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

well jim , i think we have to talk on existence of God first , before discusing any religios topic. :) please check this link jim , hope you will find something intersting.Click Here
and can you proof that there is no GOD ? :)

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

i love to help you .but please can you little bit explain what you want ,
if i am wrong please make me correct
you want to create a file and then you want to write it ?

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

Yes, unless the killing can be justified as perhaps an act of self defense.

jim in quran this act is called jihad ,Allah said in quran “Fight in the cause of God those who fight you, but do not transgress limits; for God loves not transgressors.” [Qur’an 2:190]. so if someone attacks you . its your basic right to fight with them.

In most cases I believe that murderers should be punished.

in quran Allah said ,"if anyone killed single innocent human ,it means he killed whole humanity" .

2:6 As for the Disbelievers, Whether thou warn them or thou warn them not it is all one for them; they believe not.
2:7 Allah hath sealed their hearing and their hearts, and on their eyes there is a covering. Theirs will be an awful doom.

yes there should be fair deal with everyone. :) jim if you read any religious book , including bible there are many verses which are showing that a last prophet will come and you have to believe them. here is a link for refrence jim please have a look at it.Click Here .so Allah give all the important points in bible ,and in quran there is one chapter about jesus.here is link of it Click Here.so jim Allah if a person believe on bible and he just not read it , he should accept that prophet muhammad is a messenger of God.and there is …

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

please mark this thread solved ,

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

thanks Acient Dragon , for explaining . i was confused in this so i asked here to jim , and 2nd thing i am not here to debate on anything , i am a muslim and i want to show my point of view about islam and quran as you and others are doing here. and i read quran daily and it is from when i was little child. and as you said without knowing topic .so i think many people out here want to prove islam and quran wrong. and i am trying to show them that islam and quran are wrong , islam and quran not preaching voilence.

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

yes you can develop your project in 4.0 framework , just select your framework while creating your project.

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

hello
use this

        Dim fs As IO.FileStream = New IO.FileStream("d:\a.txt", IO.FileMode.Append)
        Dim sw As IO.StreamWriter = New IO.StreamWriter(fs)
        sw.Write("TEXT" & vbCrLf)
        sw.Close()

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

jim , i am not an islamic scholer , so at this time i cant able to give you best answer, but i will ask about all these verses and post answers of all .
now i have to make something very clear.that as i give answers of your question with just yes and no , you will also give me answers of my question in yes and no .
1-if a person kill someone. should he be punished ?
2-if a person in USA is a traitor ,what is his punishment ?
3-Anyone arrogant enough to reject the verdict of the judge or of the priest who represents the LORD your God must be put to death. Such evil must be purged from Israel. (Deuteronomy 17:12 NLT) is this is from bible ? yes or no .
4-All who curse their father or mother must be put to death. They are guilty of a capital offense. (Leviticus 20:9 NLT) is this is from bible ? yes or no .
after your answers i can better justify my answers , one more thing jim ,i need to the point short answers as you required from me :). and no questions in place of any answer .

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

well , can you please define what is 2:6-7 , these numbers are showing what ? i mean these are the refrence numbers ? if yes then please elaborate little bit .so i can find these verses in Quran. and answer you .

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

you can do somthing like this . add a module and just call this public sub at your form when ever you want to clear your textboxes or other controls .

   Public Sub ClearAllTextBox(ByVal myControl As Object)
            Dim i As Integer
            For i = 0 To myControl.Controls.Count - 1
                If TypeOf myControl.Controls(i) Is TextBox Then
                    myControl.Controls(i).Text = ""
                ElseIf TypeOf myControl.controls(i) Is MaskedTextBox Then
                    myControl.controls(i).text = ""
                ElseIf TypeOf myControl.controls(i) Is ComboBox Then
                    myControl.controls(i).text = ""
                End If
            Next
        End Sub

just call it like this where you need.

    ClearAllTextBox(me) 
    'or if you have many group boxes or panel then then in place of me just write the name of group box or panel like this 
    ClearAllTextBox(groupbox1)

hope this will help you

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

Do you believe the Qur'an is the word of Allah as handed down to Mohammed?
Yes

Do you believe that the Qur'an is infallible?
Yes

Do you believe that Islam, as laid out in the Qur'an preaches a creed of non-violence?
Yes

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

ok , i change my code little bit. please replace previous code with this one.

        sec = sec + 1
        txtSec.Text = sec
        If sec = 60 Then
            txtmint.Text = Val(txtmint.Text) + 1
            If txtmint.Text = 60 Then
                mint = True
                txtmint.Text = 0
            End If

            If txtmint.Text = 0 And mint = True Then
                txthr.Text = Val(txthr.Text) + 1
                mint = False
                If txthr.Text = 100 Then
                    Timer1.Enabled = False
                    txtSec.Text = 0


                End If
            End If
            sec = 0
            txtSec.Text = 0
        End If

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

jim , what are your questions , i will try to answer them if i cant then i will ask those question to others to get best answers for you.

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

where you want to perform this action , i mean where you want to press the tab key to populate your grid from your database.

Regards

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

if you are using vs2008 then you can make applications on 2.0 , 3.0 and in 3.5 frameworks. and if you are working on 2010 then you can make applications of 4.0 framework.

M.Waqas Aslam 67 Posting Pro in Training Featured Poster

what was there when there is nothing ? i mean before the big band , what was there ? jim