Hi peoples Im newbie in Sql server 2005 and learning Here is my problem:
I have:
Table1 Complaint_Types-
TypeID int PK
Type VarChar
Table2 -Members-
MemberID Int Pk
MemberName VarChar
Roomnumber VarChar
Table3 -Computers-
ComputerID Int Pk
ComputerDescription VarChar
MemberID Int Fk
Table4 -Techs-
TechID Int Pk
TechName VarChar
HireDate DateTime
Table5 -Complaints-
TypeID Int Fk
MemberID Int Fk
ComputerID Int Fk
TechID Int Fk
Description VarChar
PostDate DateTime
ResolvedDate DateTime
I Need:
1- Idea to Get data from related Tables
2- Insert / Update all Tables
3- Calculate Date Time Feilds
eg: Complaints in current month
Complaints in last year
Time Consumed on a Complaint (Return date Postdate) in Days, hours,minutes
if any body have a working example in vb.net in form of windows Forms or Asp.net please Let me Know
any type of help welcomed
regards
Rashed Nadeem
Moving to Getting Started forum|||
Hi Rashed,
I would suggest to refer SQL Server Books Online for Insert/Update/Delete Statements
select Columnlists from Table -- Will fetch records from table, adding where columnname would fetch records based on condition given in where
insert into Table values('values',0) -- will add values to table
Refer http://www.sql-server-performance.com/forum/topic.asp?TOPIC_ID=16621
http://www.sql-server-performance.com/forum/topic.asp?TOPIC_ID=18550
http://www.sql-server-performance.com/forum/topic.asp?TOPIC_ID=13581
Refer http://www.connectionstrings.com/ for Various Connection Strings
and http://www.planet-source-code.com/ for VB, .Net source code examples
HTH
Hemantgiri S. Goswami
|||Hi Rashed:
It seems like you are seeking a way to access SQL data using managed code.
Getting familiar with ADO.net may be a great start.
Following are the links to some MSDN references and sample code that may help to get you started:
http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring.aspx
http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.parameters.aspx
http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqldataadapter.aspx
http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqldatareader.aspx
Hope these information helps. :-)
Thanks
Tommy
No comments:
Post a Comment