9,022 Topics

Member Avatar for
Member Avatar for f_atencia

Suppose I have two tables: [CODE] Table1: Pets PetID----------|Name----------|Type----------| 1 |Shaz |Dog | 2 |Molly |Cat | 3 |K9 |Dog | 4 |Billy |Goat | ______________________________________________ Table 2:PetAttributes PetID----------|AttributeName-|AttributeValue| 1 |HairColor |Black | 1 |Breed |GermanShepherd| 1 |Age |12 | ______________________________________________ [/CODE] As you can see from the sample, the …

Member Avatar for debasisdas
0
108
Member Avatar for ajinkya112

Hey people, I have a simple application which inserts data into database. The database is located on a remote machine. However this machine(which has SQL) has a router installed. My pc(which has application) can find this machine's IP address by using a code. Everything is okay till this stage. Now …

Member Avatar for ajinkya112
0
128
Member Avatar for darshini.dayal

Ihave used the following to save the users data in the the SQL table.But the data is not been save.Can anyone pls suggest what is the error? [code] { string Name = TextBox4.Text; String Telephone = TextBox3.Text; String Email = TextBox2.Text; String enquiry = TextBox1.Text; SqlConnection conn = new SqlConnection(); …

Member Avatar for MamathaS
0
242
Member Avatar for gabanxx

ai guys need a little help here..i create an interface where user can store their information like name, hobbies, DOB and phone number...the info is stored in sql server..now i want to call back all data that have being stored in sql to excel..when i say all i mean all …

Member Avatar for NanaYee
0
550
Member Avatar for pallavibhoite

I have problem with SQL query. I have table in my database which stores attendance of students. It has fields Teacher_Id, Roll_No, Date, Present('0' if student is absent on that date and '1' if present). I wrote following query SELECT count(Present ) , sum( Present ) FROM attendance_info WHERE Teacher_Id …

Member Avatar for BitBlt
0
116
Member Avatar for salmap

Hi, I have two textboxes(which are diplay only;their values come from database).I need read the data from these textboxes,multiply them and display in the third text box. Can someone send me the code. For example consider textboxes names as txtprice,txtquantity,txtamount; txtprice,txtquantity values come from tables in database.The price comes from …

Member Avatar for salmap
0
150
Member Avatar for axman1000

I have a list of values extracted from a datareader in a list. Is it possible for me to run a query to extract another set of values using a datareader and then use the individual values in the list and the values in the datareader to perform some calculation, …

0
112
Member Avatar for Jaseem Ahmed

i have connected combo box with data base... i have called a field in combo box... but i dont know how to made selection.. means when i click on items that are in combo box from database, the text box should change value according to the selection of combobox. [CODE]Option …

Member Avatar for AndreRet
0
4K
Member Avatar for anup.maverick

Hi, I am using asp.net 2.0, SQL 2005 Express Edition. I have created one database, thats working fine on local host. But when I transfered files to my hosting server, Then its giving me [COLOR="Red"]Error:- Invalid value for key 'attachdbfilename'.[/COLOR] My connection string is as follows:- data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|DataTestingServer.mdf;Database=DataTestingServer;User Instance=true …

Member Avatar for kaar3k
0
1K
Member Avatar for Arjun_Sarankulu

There are two server 1)192.168.*.* 2)192.162.*.* In first server there is database call department which contain table called [B]employee[/B] Now i want to copy the from above to second server in database company which contain table [B]employee[/B]

Member Avatar for BitBlt
0
193
Member Avatar for Jaseem Ahmed

i m using sql server 2000 with vb 6. i m having some problem in navigating recors.. when i m pressing Move Next,it moves only one record, and when i m moving Move previous, samely it move one previous record... here is a code... [CODE]Option Explicit Private con As New …

Member Avatar for Jaseem Ahmed
0
2K
Member Avatar for studentoflife

Hello, I'm trying to write an asp.net app which searches a sql db and returns/updates the data. I want to be able to hold the currently selected id of the item my user has selected. For example a doctors surgery would select a patient record then be able to browse …

Member Avatar for kouroshnik
0
147
Member Avatar for KirstyHunter

Hi, I am trying to set up transactional replication on a MS SQL 2008 database that has two Schemas, both schemas have some tables with the same names. Schema A A.Customer A.Product A.Invoice Schema B B.Customer B.Product B.Incoive My first problem is actually configuring Replication on the publisher using the …

Member Avatar for KirstyHunter
0
1K
Member Avatar for like_bilal02

Dear Freinds I face a problem that if i make a datattype in sql server of Integer and then use it in linq to sql query it give error of "specific cast not valid" and when i change datatype into varchar the linq to sql query work fine one more …

Member Avatar for like_bilal02
0
70
Member Avatar for axman1000

I would like to retrieve the previous date (i.e., current date minus 1) and use it in a query through an = operator. I got the following query to retrieve the previous date: [icode]select DATEADD(DD, DATEDIFF(DY, 0, GETDATE()), -1)[/icode] It gives: 2011-03-14 00:00:00.000 I would like to get only: 2011-03-14, …

Member Avatar for axman1000
0
240
Member Avatar for isumasama

hi pls help me on this.. i'm using this code to get data from record: [CODE] MyNum1 = DLookup("[Outcome]", "Remark", _ "[IDRemark] = Form![SelectTxt]") OutTxt.Value = MyNum1 [/CODE] my prob is when the data in [Outcome] is null , access having error to still get the null value from the …

Member Avatar for isumasama
0
624
Member Avatar for lorettah

the below code display the bill date fields empty when testing the code.can someone assist in identifying the error? [code]String custId = request.getParameter("customerId"); String emailId = request.getParameter("emailId"); String phoneNumber = request.getParameter("phoneNumber"); String[] dateStr = new String[3]; String[] status = new String[3]; try { //Code to connect to the database String …

Member Avatar for Taywin
0
131
Member Avatar for Silent-Regret

First off, I'm sorry if this is the wrong section, I've been visiting this site off and on for awhile now, but today is my first day joining. Second, I was wondering if there is a way to... auto load, I guess you could say, data from a mssql database, …

Member Avatar for Silent-Regret
0
161
Member Avatar for agr8lemon

Hello everyone! I'm trying to get a date from SQL without the year. Every code I've seen has included the year. Here is what I have now. [CODE]SELECT * , convert(CHAR, \"date\", 10) AS ndate from dbo.MYDB where 35 > DATEDIFF(d,\"date\", GETDATE())";[/CODE] I would like ndate to be show like …

Member Avatar for agr8lemon
0
188
Member Avatar for Dheerajpro

hello frnd i hav created crystal report my database name is schools and its giving exception ,,,,,,,,, exception in form loading my coding is <crystal report> Imports CrystalDecisions.CrystalReports.Engine Imports System.Data.SqlClient Public Class CRSTECHERS Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click End Sub Private Sub CRSTECHERS_Load(ByVal …

0
43
Member Avatar for bettybarnes

Hi guys,, im having problem with my stored procedure. i dont know how to make it show..when i click on a particular record on my datagridview it should display another form with its corresponding laboratory records, radiology records and so on.. here is my code [CODE]ALTER PROCEDURE dbo.ViewAllLabRecords ( @lab_Record_ID …

Member Avatar for bettybarnes
0
109
Member Avatar for axman1000

I have an SQL Server Query: select *from table1 where column in ('list of values') When I execute this, I get all the details, however, when I do this: select *from table1 where column in ('list of values') and date_of_req='2011-03-15' I get an empty table. All the column headings are …

Member Avatar for axman1000
0
191
Member Avatar for sneha mehta

I am trying to use below code for java to sqlserver connectivity.. [code] import java.sql.*; import java.util.*; import java.io.*; import java.lang.*; public class AuthorsInfo1 { public static void main(String args[]) { try { String str = "select * from authors where au_city like 's%'"; String str1 = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; Class.forName(str1); Connection …

Member Avatar for masijade
0
164
Member Avatar for alleybye

Ive been trying to understand this thing for approximately 1 day, but i cant really get it I'm about to create a report which requires TWO tables. but i forgotten that the datareport.datasource only accepts One command. so ive got the idea of creating a child command and create it …

Member Avatar for AndreRet
0
97
Member Avatar for jackparsana

hi, please help me to create setup of my web project. i use visual studio 2010 and Mssql 2008. i have problem in create setup is - i can not create App_code. - framework problem in web config file. please help me to do that. thanks jack.

0
110
Member Avatar for EricIskhakov

Hello. I have a gridview with an ImageButton that acts as an Update Command to a DataSource. and the SP works if i execute it in the server with parameters, but not through the ImageButton. I Suspect that the Parameters arn't bein sent because if i set a Default Value …

Member Avatar for EricIskhakov
0
186
Member Avatar for erum

i m facing problem while conencting with sql server mangemnet studio A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. …

Member Avatar for hchf
0
240
Member Avatar for tukky

Im working on a project for college. The form im working on allows the user to edit the details of a customer. I have the following code attached to the EDIT button [CODE] EditCustomerTable.Clear() EditCustomerConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=QuickQuotes.mdb" EditCustomerConnection.Open() EditCustomerAdapter = New OleDb.OleDbDataAdapter Dim SQL As String = "UPDATE Customers …

Member Avatar for tukky
0
280
Member Avatar for ETbo

Hello guys, I have two tables with the following structure: TABLE A: Email Address, CampaignID, Source, Unsubscribe Email1,2 Email1,1 Email1,3 Email2,5 TABLE B: Email Address, SeedList, ListName Email1,SeedListA.SeedListA Email1,SeedListB,SeedListB Email2,SeedListC,SeedListC The purpose is to merge the two tables together. But there is a really strange rationale behind this merge. If …

Member Avatar for ETbo
0
104
Member Avatar for Nony2007

Hi All, I am trying to read the SQL table and update null value with "1" and nonvalue with "0" as you can see in tables. To do this i have design i code that allow me to read the date and write to the text file but it seems …

Member Avatar for Nony2007
0
136
Member Avatar for waleed.makarem

Dear All , The question is simple , but may be It is very simple for me that I can not see it . I have two dataset , each with with table . each datasets is connected to a separate dataadapter to get data from sql server database file …

Member Avatar for Ranx
0
208
Member Avatar for lttleastig

Good day i would like to ask how to make a login system the password is encrypted with the code below. [CODE]HashBytes('MD5', REVERSE(UPPER(@ID)) + @PW)[/CODE] thanks in advance

Member Avatar for ahmedelhamahmy
0
271
Member Avatar for Mike Bishop

Afternoon All, hope someone can help as this is really doing my head in. I have a SQL View which has a field called MOP/T which shows the number like so 28.5140299679490 349.893390000000 349.893389892905 I want to format that field so that it only shows the number before the decimal …

Member Avatar for Mike Bishop
0
115
Member Avatar for paulablanca

Hello! I am just wondering if someone can help me to generate a bar graph where in the x and y values are coming from a sql database. Thank you very much and God Bless. :)

Member Avatar for paulablanca
0
101
Member Avatar for lewilaloupe

Hi, This is a SQL statement query (so may be in the wrong forum). Any help much appreciated! I have 3 tables in an Access DB (I know!): IndexData is main table with title, description, date, fileid Category table has categories (Cat1) associated to fileid in IndexData i.e. a fileid …

Member Avatar for reygcalantaol
0
198
Member Avatar for jazzyb

Hi, I am developing an application with VB.net and SQL Express. In my application I have many forms as : some of my forms are: Mainform selectmonth_form Form_report Mainform is mdiparent. slectmonth_form as child form In Mainform button click event code I have following code [CODE]If blnActive = IsOpen("selectmonth_form") Then …

0
78
Member Avatar for AngelicOne

I have a column in my table that is named 'startDateTime' and 'endDateTime'. I need to select all the rows where current time stamp is in between the startdatetime and enddatetime. Note that the datatype is smalldatetime. How to do this?

Member Avatar for Mitja Bonca
-1
62
Member Avatar for paresh_thummar

Hi I want to store query result in single variable like if query is "select count(*) from tablename" , and it return suppose 21 records (integer value) then I want to save this value in my database during insertion of record what should i write in place of question mark …

Member Avatar for Akash Saikia
0
1K
Member Avatar for Nony2007

Hi All, I can connect C# to SQL and read SQL table but i am having problem in writing the outcome to text file. I really appreciate if you could assist me. this is the code. [CODE]//====================================== using System; using System.Data; using System.Data.SqlClient; using System.IO; namespace Chapter07 { class OrdinalIndexer …

Member Avatar for Nony2007
0
1K
Member Avatar for axman1000

I have an XLS file. Let's assume that it has 1000 rows in all, with 10 columns. I would like to import rows 5 through 995 (say), and columns 1 though 7 and 10. How can I do this using an SQL query, either though OPENROWSET or BULK INSERT? I …

Member Avatar for Momerath
0
154
Member Avatar for varshasan

Imports System.Data.OleDb Public Class updateharvesting Dim co As OleDbConnection Dim cm As OleDbCommand Dim dr As OleDbDataReader Private Sub updateharvesting_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load GroupBox1.Visible = False End Sub Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged Label2.Text = "enter no" …

Member Avatar for Jx_Man
0
148
Member Avatar for Jaseem Ahmed

i have a database in sql server2000... i have some of them tables, that i want to connect with visual basic.. the connection is tested, its connected.. now first tell me which data control should i use?? And then the code for updating, editing, adding a record in my database …

Member Avatar for AndreRet
0
618
Member Avatar for pradvin

Hello All, Can some one help me how to write query for finding the profi per unit using SQL server 2005/2008. I have got a unit table which contains UnitId and Quantity and the other table which contains cost price, selling price and the Unit Id. Thank you

Member Avatar for debasisdas
0
91
Member Avatar for Joe318

Hi, I'm joining 2 tables and using the formview. When I insert a record, I need to place the value of the max id + 1 of the second table in a field in the first table so that the tables are linked. I'm not sure where to put the …

0
114
Member Avatar for Robins Antony

Hi frnds, I`ve learned from a site that Microsoft kills LINQ to SQL. URL follows: [url]http://ayende.com/Blog/archive/2008/10/31/microsoft-kills-linq-to-sql.aspx[/url] Actually, I was planning to use LINQ to SQL in my next project. Now I`m confused!. Is it true? Regards Robins

Member Avatar for Mike Gale
0
83
Member Avatar for moone009

[CODE] SELECT p.* FROM (SELECT CONVERT(CHAR(10), li.RequestResolutionDate,110) AS DeliveryDate, ISNULL(ity.ItemTypeCode,'N/A') AS 'ItemTypeCode', rc.ResolutionCodeDescription FROM LALocationItemTypeRequest li LEFT JOIN LAItem it ON li.ItemID = it.ItemID LEFT JOIN LAItemType ity ON it.ItemTypeID = ity.ItemTypeID LEFT JOIN LAStop st ON li.StopID = st.StopID LEFT JOIN LALocation lo ON st.LocationID = lo.LocationID LEFT JOIN …

0
70
Member Avatar for mayankdvd1

I have a datatype date in sql.I have to insert this value through asp.net. I have a textbox that takes date value in asp.net.How o convert this into date datatype so that it is accepted by sql Thanks in advance

0
61
Member Avatar for judithSampathwa

hi , can some one provide me with a tutorial in creating user group in ms sql and assigning users to that group appreciate a lot thanks

Member Avatar for judithSampathwa
0
317
Member Avatar for Jaseem Ahmed
Member Avatar for Jx_Man
0
171
Member Avatar for tariqi

hi guys, I am using Column properties in SQL Server 2005. I was all ready assisted with this in SQL and it works fine. Now I need to get it to work in a Visual Basic 2008 Data-Grid. I don’t necessarily need general help with “Add new data source” => …

0
66

The End.