9,022 Topics
I tried below code... it's doesn't work as well... any got solution for this? Thanks. [CODE]using (OleDbConnection con = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\"" + fileName + "\";Extended Properties=Excel 8.0;"))[/CODE]
HI There, I am facing a different kind of issue, which is giving the below error, [COLOR="Red"]Microsoft OLE DB Provider for SQL Server error '80040e21' Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done. /CISL/Web/Calls/BNTANT Response Time/BNTResponseTime_Graph.asp, line 246[/COLOR] The stored …
hi,i want to insert booking_no as combination of year and sno(year/sno) into database here iam giving the code as follows,,,,,,,,, here sno(serial number is automatically generated when page is loaded) started from 1......... [CODE] Dim conn As New SqlConnection(ConfigurationManager.ConnectionStrings("guest1").ConnectionString()) Dim booking_no, sno As String If Len(sno) = 1 Then sno …
Yesterday [URL="http://www.daniweb.com/blogs/entry3943.html"]I reported[/URL] how the security vendor Kaspersky had allegedly fallen victim to a SQL Injection attack, with the usa.kaspersky.com website hacked and plenty of data potentially exposed. I said that Kaspersky would no doubt make an official statement sooner rather than later, and it has. Unfortunately it is one …
How can we connect two databases to PHP at same time. Like .. retrieve data from Mysql and compare it with MSSQL data. :-/
hi,i want to insert booking_no as combination of year and sno(year/sno) into database here iam giving the code as follows,,,,,,,,, here sno started from 1......... [CODE] Dim conn As New SqlConnection(ConfigurationManager.ConnectionStrings("guest1").ConnectionString()) Dim booking_no, sno As String If Len(sno) = 1 Then sno = "0000" + CStr(sno) End If If Len(sno) …
Hi Friends, Can there be a query that will SELECT fields of a table and group a column (say "CustomerID") and show all its rows along with its subtotals and then its Grandtotal in the result returned? For Example, CustID Items Cost ExtraCharges --------------------------------------------------------------------------------------- A1 Cofee 15.00 2.00 A1 Tea …
I have this sql code which works fine : [CODE]sql = "select count(city) as cx from NY where CITY='New York'" set rs=conn.execute(sql) response.write(rs("cx")) [/CODE] The above counts all records with New York city. I have been trying to put this on a dynamic .asp page and modify line 1 to …
I have a list box in my vb form. The list box is dynamically filled with components from my ms-access table. Now the user can select one, two or many options. For example: The list box has many softwares. 1. If user selects Windows XP and Office 2007 then those …
Hi guys good day. Sorry for the delayed response to my previous post.We currently just change our internet connection. I just want to ask on how to get the data of this sql statement because it only returns the total records found. [code=vb] rs.open "select count(*) as idnumber from tblstudent …
I have this error: A request to send data to the computer running IIS has failed. For more information, see HRESULT. : Microsoft SQL Server Compact. is this a error from pull or from remote connection string: [CODE] private string strConnRemote = "Provider=SQLOLEDB;" + "Data Source=GEBRUIKER;" + "Initial Catalog=auto;" + …
Hi. I'm new to ASP.net and I'm having a bit of trouble with loading information in from web.config. I've stored my database connection in the web.config and the rest of the code is in my code behind file. Here is the code behind file followed by the web.config extract. The …
Hi I have a ASP.Net code below that need to query with MS SQL database. [code] "select SUM(ShopCartItem.Price-OfferedPrice) As Discount from ShopCartItem " & _ "Inner Join Product " & _ "On ShopCartItem.ProductID = Product.ProductID " & _ "Where(ShopCartItem.ShopCartID = @ShopCartID) And ShopCartItem.ProductID != @ProductID" [/code] The MS SQL query …
Hi all, The problem here is, is there a way in which i call the output of 1 stored procedure inside another and display that in the 2nd procedure results..? Should we call a stored procedure inside a stored procedure for for this..? If so, wats the way..?
[CODE]See current output starting at page DROP TABLE EMPLOYEE; DROP TABLE JOB_TITLE; Create Table EMPLOYEE ( EMP_ID int NOT NULL, LAST_NAME varchar(20) NOT NULL, FIRST_NAME varchar(20) NOT NULL, EMP_ADDRESS varchar(25) NOT NULL, EMP_CITY varchar(25) NOT NULL, EMP_STATE char(2) NOT NULL, AREA_CODE int NOT NULL, PHONE_NUM int NOT NULL, HIRE_DATE datetime …
Hi All, I'am having great trouble with the db design (MS SQL Express 2005)of a Facility Booking System DB Design and its urgent. Please help! I'am currently building this web application for a organising committee which is responsible to book facility (tennis court or squash court) at a particular location …
Hey guys, I'd posted earlier about creating a database for a vaccination clinic is a slum. All the responses were really helpful (thank you!) but I'm encountering some further problems. In a table named "Table Children" I have a "Date of Birth field" and and an "Age at the time …
Hello Sqlserver MyTable has following data Vou---------date---------qty 1-------25/12/2009------5 2-------25/12/2009------4 1-------26/12/2009------8 2-------26/12/2009------3 3-------26/12/2009------2 [CODE] str = "SELECT date, SUM(Qty) AS Qty, FROM mytable GROUP BY Date" dt = GetTable(str) [/CODE] These codes display following result date--------------qty 25/12/2009------9 26/12/2009------13 Now I want to add sno column in result as Sno--------date---------qty 1------25/12/2009------9 2------26/12/2009------13 …
Hello Everyone Sqlserver Table1 has following data Sno---------date---------qty 1-------25/12/2009------5 2-------25/12/2009------4 1-------26/12/2009------8 2-------26/12/2009------3 3-------26/12/2009------2 I want to get following result Sno---------date---------qty 2-------25/12/2009------9 3-------26/12/2009------13 That is grouping on date. Column1 =count date Column2 =date Column3=sum of qty What command should I write to get above result Please help
what type of indexes exists in Sql Server ?which one is the fastest and why can we only have one of those per table ?
This is for all of you developers out there who have busted their tails to produce a quality product. I have built a fairly complex website utilizing VB.NET with a SQL Server back-end. The database itself has over 20 tables and thousands of records. The other day I got an …
Hi, I need to create procedure which takes 1 variable as input. The datas are frm diff tables, I have done it using joins, Now, i need to call them thru just select statements.. is it possible, if yes, wats the way to do so...
hi iam written the update commands very strengthly........ please short them..... here my commands are....... [CODE] conn.Open() Dim insert1 As New SqlClient.SqlCommand("update guesthouse set check= 'C' where (date_of_arr >= getdate() and date_of_dept >= getdate()) ", conn) Dim insert2 As New SqlClient.SqlCommand("update guesthouse set check= 'O' where (date_of_arr <= getdate() and …
hi guys..i had a online library management systm..i used sql DB...now i want to convert that sql to sql inbuilt DB..so that my app could run on inbuilt sql server...as now my app is not running on inbuilt servers..plz help me regarding this
i m creating sms service in web application i complete ma code but now i m facing problem to send sms via way2sms bcoz i know its IP Address but not Port no , i wanna know is it necessary to use waytosms port no or can i use some …
[code] SqlConnection con = new SqlConnection(scon); con.Open(); SqlDataAdapter da = new SqlDataAdapter("select Question,Option1,Option2,Option3,Option4 from QuestionData", con); DataSet ds = new DataSet(); da.Fill(ds); foreach (DataColumn dc in ds.Tables[0].Columns) { foreach (DataRow dr in ds.Tables[0].Rows) { Questionlable.Text = dr[0].ToString(); OptionList.Items[0].Text = dr[1].ToString(); OptionList.Items[1].Text = dr[2].ToString(); OptionList.Items[2].Text = dr[3].ToString(); OptionList.Items[3].Text = dr[4].ToString(); } …
hi iam getting error like "Conversion from string "0/" to type 'Double' is not valid." in the underline part of the coding .......... here iam using sqlserver-2005 here my coding is [CODE] Protected Sub save_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles save.Click Dim conn As New SqlConnection(ConfigurationManager.ConnectionStrings("guest1").ConnectionString()) Dim …
Hi, I want to set typed dataset in my appl. joining 2 database tables. I can define dataset as xyz.xsd no problem, I define the relations. So this is a fixed set that I can use. But what if I have to add additional conditions to filter the data within …
hi, i am using this datetime data type in one of my mssql tables... i just want date & not time........ can any one help me with a patch of code....... thanks in advance
I have two tables but I'm thinking it should be one. one is: [B]Courses [/B] columns are: [B]CourseID, Title, Description, Objectives, Price, Length, Prerequisites[/B] the other is: [B]CourseDetails[/B] columns are: [B]CourseID (where this is checked against the Courses table, must exist in the Courses table), CategoryID, TypeID, SubTypeID, Type[/B] First …
[CODE]private void button1_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection ("Data Source=.\\SQLEXPRESS;Initial Catalog=test1;Integrated Security=True"); SqlCommand cmd = new SqlCommand("dbo.get", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@userName", textBox1.Text); try { con.Open(); SqlDataReader read = cmd.ExecuteReader(); read.Read(); if (read.HasRows) { textBox2.Text = read["password"].ToString(); Form2 fr2 = new Form2(); fr2.Show(); con.Close(); } else …
Hi All! I have a table that there is a combo box inside the table. For example, the combo box consist of item codes. And then, whenever user choose item from combo box, the next column inside the table will show name of the item. Here is my example coding: …
hi i want to show the grid view in another web page when button is clicked,,,,, here iam using sqlserver-2005, here my code is given below [CODE] Protected Sub chkavail_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles chkavail.Click Dim a As String Dim b As Boolean Dim dr As …
hi, i had got a problem when iam using to show the crystal reports using an condition it was not working properly ,,,,,, here my code is given below ,,,,,, iam using sqlserver..... [CODE] Protected Sub search_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles search.Click Dim cryRpt As New …
how to make database connection in sqlserver 2005 in c#
Dear Experts SqlServer Table1 has data as follows Sno-------date 1------01/01/2010 8------01/01/2010 1------02/01/2010 5------02/01/2010 2------18/01/2010 9------18/01/2010 3------18/01/2010 1------03/01/2010 6------03/01/2010 My questions are: 1) I want to display the SMALLEST Date into textbox1 which is 01/01/2010 2) I want to display the BIGGEST Date into textbox2 which is 18/01/2010 3) I want …
I am trying to calculate the ending inventory cost using weighted average. I have figured out a column for the cost per item (CostperItem), and a column for item on hand(QuantityAvailable). Now I want to multiple those two columns together and get a new column for the result. how can …
I made a very simple website using ASP.NET and SQL Server. I will post all the code up if it will help. On my local machine, the website works perfectly. I can preview it from Visual Studio fine, and I set up the IIS on my localhost, and it works …
Hi I need to insert a flat text file into a SQL Server table using C#. The text file lines are 500 characters long and I will need to break it up into columns. Column 1 – 6chars, Column 2 – 1chars, Column 3 – 8chars I’ve managed to read …
Hi there, I am trying to write a stored procedure that will basically loop through the database, get allthe tables in the database and then for each table in the database it will take an entry of that database and just insert it into that same table again... i am …
Hi, We are designing a windows application where we need to 'Get tables and columns from existing sql server snapshot file or backup file' . Does anybody know how it can be done. Please provide help. Thank you.
Since there is no system function for calculating the median value in a data set I was going to make a function to do the trick. I would like this function to be available to me in all my databases without having to redefine it for each. Is there a …
after putting some errorts.. i managed to kick start with my project... a basic project on inventory management.... wer add,del,edit,view.. of inventory stuffs can be done... but now.. i hav sucessfully.. 1.created a table in SQL 2000 ( all the tables tat wer req for my inventory) 2. created rough …
Hi I am a new user in access and created a database to use in accounting practice. I want to create a query control that will show the opening balance, plus fees less closing balance = 0 as all data are imported from another system. The problem is that the …
Hi, I have a 3 tables needed to be inner join before I got a full details of a transaction history (What item, shipment details, quantity, who bought it etc). The involved tables are ShopCart,ShopCartItem and OrderData ShopCart: [code] CREATE TABLE dbo.ShopCart ( ShopCartID int IDENTITY (1,1), ShopperID int NOT …
Hi everyone I am executing a query on sqlreader object i.e. rdr = cmd.executereader(); now I get a value rdr[0] = 100; but this value is in reader object. I want to transfer that value rdr[0] to integer variable how can I do that? I tried int.parse, int.tryparse, convert.int32..etc it …
hi this is my coding when i run this coding for display the content in textboxes from the database by click event in datagrid. "Procedure or Function 'sp_developer_display' expects parameter '@developerid', which was not supplied." this error will display my sp in sql express is [code=text] ALTER PROCEDURE dbo.sp_developer_display ( …
hi guys lately I've been experiencing LinqToSql + Sql Server Express 2005, and it was a great journey (muddy) anyway .... I'm at the point that I want to make a Backup/Restore for the database backup for SSE is as easy as a simple copy paste of the mdf file, …
Hi. I would like to create those checked rows in gridview with a button click. For example, an user checks 2 rows in the gridview, and clicks on the create button. I would want the selected row/s to be created to the database. How would I go about doing this? …
Dear SIR, I am using sqlserver2005. Table1 has a column named bill_no and its type is text Now I want to change its type "Numeric" When I do this the it displays this error message --------------------------- Microsoft SQL Server Management Studio --------------------------- Conversion from 'text' to 'numeric' is not supported …
The End.