|
can anybody tell me how i can connect vb.net with mysql.
byeeeee
Aavesh
|
|
|
|
|
Have you looked at mysql's website?
|
|
|
|
|
hi
i went on the mysql website.but i'm very novice in dotnet.so didn't get anything please send me the code or steps to connect.
Aavesh
|
|
|
|
|
Access MySQL from NET application can be done as same as MS SQL Server by using MySQL Connector for Net. Just download that connector from MySql website and see their samples enclosed.
|
|
|
|
|
|
hi
plz can u help me
I make the data base employee form
this form company
i but all information in the data base and make in vb form to make a small project
i went to help and give the code for use a search button
to search in the data base and give me the information for the employee who`s i wont to search it
and thanks or ur help
|
|
|
|
|
hi, I have a dataset, DataSet1, populated from a database table named "Sections" which is bounded to DataGrid1.
I want to remove a row if a user selects it in the datagrid and presses the remove button. here is the vb-code:
Private Sub cmdRemove_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdRemove.Click
If DataGrid1.CurrentRowIndex >= 0 Then
DataSet1.Tables("Sections").Rows.Remove(DataSet1.Tables("Sections").Rows(DataGrid1.CurrentRowIndex))
MessageBox.Show(DataSet1.HasChanges)
OleDbDataAdapterSections.Update(DataSet1, "Sections")
DataSet1.AcceptChanges()
End If
End Sub
But messagebox shows False, and the row is not actually removed from the database, ALTHOUGH DataGrid1 shows that the row has removed from dataset!
(I use the same method i.e. DataSet1...Rows.Add(..) and then the oleDbDataAdapterSections.Update(..) to add rows which works perfectly!! But the added rows are not removed using the same code from the database...)
I really dunno the reason and got confused!
-- modified at 17:50 Friday 31st March, 2006
|
|
|
|
|
i want to company that if today date is greater than do step 1 and if not than do step 2 and i m doing this
IF dbo.FormatDate(GETDATE()) > dbo.FormatDate('28/04/2006')
--Step 1
ELSE
--Step 1
but its not proper working i can do this with year, month and day individual comparison buts not proper way to acheive task.
can anyone tell me that what's the mistake in above code
dbo.FormatDate() is a function which extract only date from date and time.
Thanks
|
|
|
|
|
I'm guessing (becuase you've not provided the code) that FormatDate is a UDF that returns some value that you can test against. I don't know why you need to do this as you can check greater than/less than on a date already.
IF GETDATE() > '2006-04-28'
BEGIN
-- Do stuff
END
ELSE
BEGIN
-- Do other stuff
END
I would recommend that you always use ISO dates (YYYY-MM-DD) - that way you don't get messed around with cultural specific problems.
ColinMackay.net
Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
|
|
|
|
|
Thanks for ur comments i have solved the problem with this code
SET Dateformat dmy
IF GETDATE() > dbo.FormatDate('24/04/2006')
BEGIN
PRINT 'A'
END
ELSE
BEGIN
PRINT 'B'
END
Thanks
Best Regards,
Tariq Mahmood
|
|
|
|
|
Hello
I'm trying to connect to SQL Server2000 that in another computer in local area network.
but it says login failed for user "Guest"
- I added my windows account (MyDomain\MyWindowsUserName) to SQL Server.
- I use windows only authentication.
- both computers are Windows XP Pro-service pack 2
- When I add Guest windows user to SQL server, it works fine.. But I don't want to use Guest account.
- both computers are in same WorkGroup
- I added user name to server computer with exactly same user name and password.
any help... thanks
|
|
|
|
|
denizmercan wrote: I added user name to server computer with exactly same user name and password.
Have u added username in Sqlserver Database Users?
"Aim to go where U have never been B4 and Strive to achieve it"
http://groups.yahoo.com/subscribe/dotnetforfreshers
http://himabinduvejella.blogspot.com
|
|
|
|
|
Yes I added.. and I gave full permission to that user.
|
|
|
|
|
I am asking whether u have added user name in enterprize manger users
ie database users
Got me
"Aim to go where U have never been B4 and Strive to achieve it"
http://groups.yahoo.com/subscribe/dotnetforfreshers
http://himabinduvejella.blogspot.com
|
|
|
|
|
Yes I did what you say...
|
|
|
|
|
Hi there,
I am installating msde with my application using installshield (10.5) prerequsites(redistributable). The problem i have is that on windows 2000 after msde installation system require a reboot(there is no way out i tried all the commandline arguments but even if i am sucessfull in supressing reboot still sql script with my installation which create database don't get sucessful without reboot). To solve this problem what i tried is to use installscript and add a registryentry in runonce as my installation begins and delete it at the end of installation with another installscript custom action. The only problem is that i can't run my custom action prior to setup prerequisites get installed. I tried to set the sequence of my custom action to -5(means run first up) but still the msde setup starts prior to my custom action. Is there a way to run custom action prior to setup prerquesites or is there any solution to continue setup after msde installation?
Thanx for help in advance.
Qaiser.
|
|
|
|
|
Hi,
I need help on creating an SQL statement that will add up all the numbers in a given column of all the matching rows of data.
At present i have:
OleDbCommand cmdC = new OleDbCommand("SELECT COUNT (bookingNumbers) FROM tbl_Booking WHERE bookingWhen='"+addDays+"'", myConnection);<br />
cmdC.Connection.Open();<br />
covers = Convert.ToInt16(cmdC.ExecuteScalar());<br />
cmdC.Connection.Close();
But this just returns the number of matching records rather than the total of the data in these records.
Any help would be greatly appreciated!
Thanks!
Pablo
|
|
|
|
|
The SQL COUNT function returns only a count of records returned. You need to use SUM instead but you will be forced to use GROUP BY since SUM is a summerization function.
|
|
|
|
|
Hi,
Thanks for the reply.
Im new to .Net so could you give me an example of how to create this statement, and if possible how to run this code in c# .Net ?
Thanks!!!!!!
|
|
|
|
|
First of all, your problem is really SQL related. I am getting ready to go to work and I don't have time to leave a good example so here is how your SQL might look like:
SELECT SUM(bookingNumbers) FROM tbl_Booking WHERE bookingWhen='"+addDays+"'"
The "GROUP BY" might not be necessary. If it is do this:
SELECT SUM(bookingNumbers) FROM tbl_Booking WHERE bookingWhen='"+addDays+"' GROUP BY booingwhen"
|
|
|
|
|
what is a Tenant Database?
Mad Max
|
|
|
|
|
guptalav wrote: what is a Tenant Database?
The only thing I can think of is that it is a database that contains details of tenants (people that rent properties).
It might be useful if you provide the context in which you find this term.
ColinMackay.net
Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
|
|
|
|
|
I think they use the term Tenant Database when more than one organization share the same datasource.
I think it's relatively new term.
|
|
|
|
|
Strange tot hear that!
"Aim to go where U have never been B4 and Strive to achieve it"
http://groups.yahoo.com/subscribe/dotnetforfreshers
http://himabinduvejella.blogspot.com
|
|
|
|
|
hi
i am facing one starnge problem...............
I have one table in SQL DB which has following constraints........
<b>Indexes</b>
IX_InvoiceTaxDetails_InvoiceDetailIndex clustered located on PRIMARY InvoiceDetailIndex
PK_InvoiceTaxDetails nonclustered, unique, primary key located on PRIMARY InvoiceTaxDetailsIndex
<B>Constarints</B>
FOREIGN KEY FK_InvoiceTaxDetails_InvoiceDetail No Action No Action Enabled Is_For_Replication InvoiceDetailIndex
REFERENCES BMJ.dbo.InvoiceDetail (InvoiceDetailIndex)
FOREIGN KEY FK_InvoiceTaxDetails_TaxCombinationsDetails No Action No Action Enabled Is_For_Replication TaxCombinationsDetailsIndex
REFERENCES BMJ.dbo.TaxCombinationsDetails (TaxCombinationsDetailsIndex)
PRIMARY KEY (non-clustered) PK_InvoiceDetailIndex (n/a) (n/a) (n/a) (n/a) InvoiceTaxDetailsIndex
Even though i have defined <b>Primary key On column Invoic</b>eTaxDetailsIndex my table has <b>multiple data with same </b>Value in InvoiceTaxDetailsIndex field
e.g
InvoiceTaxDetailsIndex InvoiceDetailIndex TaxCombinationsDetailsIndex TaxAmount TaxValueSlabIndex FoxUpdate UpdateDateTime
---------------------- ------------------ --------------------------- ----------------------------------------------------- ----------------- ------------------------------------------------------ ------------------------------------------------------
<b>305123 </b> 143171 2803 778.57000000000005 561 NULL 2005-11-19 19:55:34.763
<b>305123 </b> 143171 2803 778.57000000000005 561 NULL 2005-11-19 19:55:34.763
can any one tell me what could be the reason..........
Regards,
Ritesh
|
|
|
|