9,022 Topics

Member Avatar for
Member Avatar for MARKAND911

I am developing an application in Classic ASP My database is SQLSErver 2008 I am getting a problem in connecting to my database. Here is the code which i used to connect. [CODE] connstring ="server=mymsever;database=mydb;Trusted_Connection=Yes;" set conntemp = server.createobject("ADODB.Connection") conntemp.ConnectionString=connstring conntemp.Open() Response.Write(conntemp.State) [/CODE] The last statement is for the confirmation …

Member Avatar for Golden-Boy
0
167
Member Avatar for jcarbillon

Hi Guys. Is it possible to trap this error in Classic ASP, and redirect to another page instead of displaying this error? [COLOR="Red"] Microsoft OLE DB Provider for SQL Server error '80004005' Transaction (Process ID 104) was deadlocked on lock resources with another process and has been chosen as the …

Member Avatar for Golden-Boy
0
270
Member Avatar for judithSampathwa

hi i have a question relating to date. i have a table in a database which has the start date of an employee. what i want to do is i need to know how many years have he been working. so i need to get the current date and substract …

Member Avatar for judithSampathwa
0
200
Member Avatar for raghujosh

I have a JAVA method that executes the following query to SQL server database SELECT [CHEMICAL_NAME],[CHEMI_UNIT],[PRICE],[VENDOR],[CATEGORY]FROM [RPS].[dbo].[Chemicals]where CATALOGNO = '" + catNo+"' ;"; Following are the column names of the database table CATALOGNO, CAS_NO, CHEMICAL_NAME, CHEMI_UNIT, PRICE, VENDOR, CATEGORY, I get the above mentioned error "com.microsoft.sqlserver.jdbc.SQLServerException: The column name CATALOGNO …

Member Avatar for debasisdas
0
159
Member Avatar for jovillanuev

Hi Expert, Guys, i need your help on how to do a script calculating the totalDays using the formula (see below). i have to calculate the totaldays based on different Supplier and Rtype and also if the totalday is less than the warranty period i have to indicate it as …

Member Avatar for jovillanuev
0
129
Member Avatar for zachattack05

OK so I have a decent database that I have set up with all the correct tables and relationships, but now I have another issue, and that is distributing it. I don't know how to achieve what I am after. I know how to install SQL Server Express during my …

Member Avatar for zachattack05
0
144
Member Avatar for speak2ab

I am trying to connect to crystal report from Visual Studio 2010 but i realised my SQL database should have SQL authentication (i.e requires user and password) instead of windows (which was assigned by default). I have tried several approaches to achieve this without luck. Will appreciate some help.

Member Avatar for speak2ab
0
149
Member Avatar for Mangesh G

I have written an SQL query to return the total quantity of products ordered and total price. The query returns a result for each order in the range I have specified.Please find attached the output i am getting. the desired output i want is as follows: (year,productcode, productname, orders, quantity, …

Member Avatar for urtrivedi
0
285
Member Avatar for Tank50

Hi In my office there is an application ,and database is Sql server 2000.Using ODBC connection application connect to database.Recently database move into sql server 2005.Now application is not working,Its generate error message error message is "Connection failed".I tested the ODBC connection its okay. *I dont know what is language …

Member Avatar for prit005
0
204
Member Avatar for krunalkakadia

hi all, i am generating crystal report. i am using sql server 2008 and VS 2008. problem is that data isn't printing in report. [code] ReportDocument rptdoc = new ReportDocument(); private void bindreport() { con.Open(); string filepath = Server.MapPath("~/")+"Reports/SampleCrystalReport.rpt"; rptdoc.Load(filepath); DataTable dt = new DataTable(); SqlCommand cmd = new SqlCommand("select …

0
76
Member Avatar for bhagawatshinde

Hi, I have an problem while copying database file to another folder. In Brief i have develop an windows application in that one form is Data Backup and restore. Suppose i have run form separately then i will copy these file from one place to another but if i have …

Member Avatar for bhagawatshinde
0
405
Member Avatar for AAREN1975c

Hello everybody, I am new to this forum and i have little experience with php, dotnet, mysql and ms-sql. I would like share my knowledge.

Member Avatar for a.oprea
0
70
Member Avatar for jaycastr

Hey fellas, I have a problem with my current code. I have a checklist that i want certain items to be selected bases of a sql query. here is the code: [CODE] public void PopulateCheckList(int Program_Id) { SqlDataReader myReader = null; String appConnectionString = "Data Source=csdb-wc-1p;DataBase=oparch_metrics_v2;User ID=ops_metrics_admin;Pwd=M3tr!c$@dm!n"; SqlConnection myConnection = …

Member Avatar for jaycastr
0
92
Member Avatar for zachattack05

If I have SQL authentication enabled, and a user (UserA) on a database has permission to delete rows on TableA, but not TableB, and there is a relationship between TableA and TableB, can UserA successfully delete a record on TableA and have the changes (based on relationships set up) cascade …

Member Avatar for zachattack05
0
125
Member Avatar for lianpiau

I want select rows from datagridview and insert into another Table(give the table : Label) Now my problem is this datagridview contain columns quantity and ItemPerPackage. Quantity column is Total quantity for this item and ItemPerPackage is 1 package can contain how many quantity. therefore, I want this 1 record …

Member Avatar for lianpiau
0
216
Member Avatar for zoraster01

i wonder why my code have an error.. this my code and i will highlight the error[CODE].. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim connection As New SqlClient.SqlConnection Dim command As New SqlClient.SqlCommand Dim adapter As New SqlClient.SqlDataAdapter Dim dataset As New DataSet connection.ConnectionString …

Member Avatar for Mitja Bonca
0
153
Member Avatar for jacksantho

Hi , i am using mssql. I had a field with datatype [B]datetime[/B]. [CODE]My php coding: $requested=date("d/m/y : H:i:s", time()); i am using this query insert into tbl values('$requested')[/CODE] while inserting into my mssql table, i am facing the following error Warning: mssql_query() [function.mssql-query]: message: Syntax error converting datetime from …

Member Avatar for vibhaJ
0
309
Member Avatar for barriegrant1

im using a stored procedure to load a number of galleries and then photos within the gallery, however when linking them to the listView only the first two photos are returned. Stored procedure [CODE] ALTER PROCEDURE dbo.test AS declare @galID int Declare c Cursor For Select Distinct gallery_id From galleries …

Member Avatar for barriegrant1
0
163
Member Avatar for kapojian

hi, im not that good in sql and i dont know how to make a stored procedure. in my windows form, i need to archive two table from my database but only those inactive user will be archived. if user is not updating his profile for a month.... e.g TABLE1 …

Member Avatar for kvprajapati
0
111
Member Avatar for zoraster01
Member Avatar for amitmardana
Member Avatar for firebirds98

I am trying to populate a drop downlist on my page with data in flightnum from the table Air_Flight, my dropdownlist keeps having System.Data.Datarow in the dropdownlist. Im pretty sure im one line of code away from getting the actual values in the dropdownlist, I am just not sure which …

Member Avatar for Ezzaral
0
427
Member Avatar for pclfw

I was asked a question a few days ago that I cannot easily answer. "Why don't we put all of our small application databases into a single database?" Well, There's nothing really stopping us. All of our small apps were developed in house so we don't have any problems with …

Member Avatar for Netcode
0
162
Member Avatar for coroll

Hi all, when i execute it gives me this exception. I am trying but i coudnt slove. Plz help me. InvalidOperationException ExecuteNonQuery requires an open and available Connection. The connection's current state is closed. it points to this line -> "int executed = com.ExecuteNonQuery();" this is my code: [CODE] try …

Member Avatar for coroll
0
173
Member Avatar for Ichcha

the following gets first date of the week [CODE]DECLARE @Year SMALLINT = 2011 ;WITH cteSource(firstdate) AS ( SELECT CONVERT(varchar(50), DATEADD(DAY, 7 * v.Number, o.Origin), 101) AS firstdate FROM ( SELECT DATEADD(DAY, DATEDIFF(DAY, '18991230', STR(@Year, 4, 0) + '0101') / 7 * 7, '18991230') ) AS o(origin) INNER JOIN master.dbo.spt_values AS …

Member Avatar for adam_k
0
161
Member Avatar for Ichcha

[CODE] set datefirst 6 datepart(wk,'2011-01-12') [/CODE] yields 2. I would like to derive 2011-01-08 from this number. please help.thanks in advance.

Member Avatar for Ichcha
0
123
Member Avatar for limskii

I am getting this error microsoft.sqlserver.jdbc.SQLServerException: The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Too many parameters were provided in this RPC request. The maximum is 2100. im new to coding stuffs, i know that i am passing morethan 2100 parameter that is why …

Member Avatar for adam_k
0
440
Member Avatar for kashyapst

Every time my web application hits SQL server a query or Procedure should be called and should return its values to web application. How can i do this?

Member Avatar for jugosoft
0
147
Member Avatar for abc88

i have an application. which is executed after every 5 mins. i have an open connection but it gives me the following error: ExecuteScalar requires an open and available Connection. The connection's current state is closed. my code is something like this. I have shown where all i am using …

Member Avatar for GeekByChoiCe
0
888
Member Avatar for mOrloff

I'm connecting to the DB with LibreOffice Base, and initially forgot that this [I]isn't[/I] a MySQL db [COLOR=SlateGray](it's our only non-mysql db)[/COLOR], so I have to say thanks to those from the other forum who helped get me started when I mis-posted. Anyhow, here's what I've got: [CODE]SELECT DISTINCT c.primaryemailaddress, …

Member Avatar for mOrloff
0
176
Member Avatar for nohal.surya

Q--> i have a [U]employee[/U] table which cantain following field (eid,enm,salry,did) and i need a list which has employeies complete information whose get minimum saler in each department *** only single list cantain all employee info whose get minimum salry

Member Avatar for adam_k
0
163
Member Avatar for PS189

Hi all, Batchdate comes in as string format (07/07/2011). I tried but for some reason am not getting any results. Any ideas? [CODE]ALTER PROCEDURE dbo.CouponReportbyScheme ( @BatchDate varchar(20) ) AS declare @myDate datetime select @myDate = convert( datetime, @BatchDate) Select * from Coupons where CouponGenerationDate=@myDate [/CODE]

Member Avatar for BitBlt
0
138
Member Avatar for mOrloff

I'm trying to populate a temp table, and I'm getting this error [INDENT][COLOR="Red"]Msg 8152, Level 16, State 14, Line 1 String or binary data would be truncated. The statement has been terminated.[/COLOR][/INDENT] Hmmmm ... here's what I'm trying. I created two temp tables and populated #emails from a spreadsheet (text …

Member Avatar for mOrloff
0
170
Member Avatar for Delzur

Bonjour à tous ! Question je pense assez simple, j'ai une bdd sql server 2008 avec 3 tables. Lors de mon premier test (je suis nouveau dans CR) j'ai mis toutes les tables dans le rapport. Même en retirant les liens, il me mixe les données bizarrement. J'en ai conclut …

Member Avatar for Delzur
0
228
Member Avatar for n1_razz11

hey i got 2 tables named tbplayer and tbpair in database named dbgame.mdb tbplayer has 2 field player_id and player_name.. tbpair has three field pair_id(autonumber), player_1 and player_2 i have create combobox to get player id in tbpair from tbpair.. so i don get code.. my sample code is [CODE]Imports …

Member Avatar for debasisdas
0
263
Member Avatar for Newbie_ITstuden

Is it possible to display multiple records in a 1 datagrid?? Like for example I have a 2 tables True_False SeqNo SubjectId BookId Question Level True_False_Details SeqNo Answer I have a textbox name SubjectId, when i input a valid SubjectId it should display the record Question Level from the True_False …

Member Avatar for hericles
0
85
Member Avatar for zoraster01

good day everyone i`m beginner in vb.net .. i want to learn this kind of program.. and this are my problems: 1. i dont know how to connect my vb.net program to sql server?? can you help me. 2. how can i call my fingerprint scanner to my vb.net program. …

Member Avatar for synatx error
0
798
Member Avatar for and12

It is catching my exception error when I try to do a select student_id student_name from Student and put it in my dropdownlist. I already created the databases called college and tables Student, Course, and StudentCourse and put in fake data. I store my Connection String in the web.config file. …

Member Avatar for mlesniak
0
300
Member Avatar for fransiskus
Member Avatar for Netcode
0
491
Member Avatar for abc88

i am having an sql query in catch block. the code is: [CODE] Dim str_exception As String = ex.Message Dim sql5 As String = "insert into table_data(type,description) values('ERROR'," + str_exception + ")" Dim cmd_sql5 As New SqlCommand(sql5, connection) cmd_sql5.ExecuteScalar() [/CODE] it throws an exception at cmd_sql5.ExecuteScalar(). the exception is - …

Member Avatar for Netcode
0
230
Member Avatar for jgat2011

Hi, I am developing a system for a business and would like the server to be one of the computers of the organisation. My problem is that i don't know how to make the database accessible by the other machines. Thanks in advance.

Member Avatar for Netcode
0
151
Member Avatar for zebnoon

Hello to all, I have installed SQL Server 2005 on windows xp . Please tell me how can i create new SQL database ?

Member Avatar for ChrisHunter
0
171
Member Avatar for ste713

Can someone help stop my head ache! Im sure its very simple (it is with php). I have run one query to get a users current cash [CODE] SQL = "SELECT * FROM money WHERE id='fred' Set Recordset = Server.CreateObject("ADODB.Recordset") Recordset.Open SQL,Connection Recordset("cash")[/CODE] This is correct and pulls the value …

Member Avatar for jcarbillon
0
111
Member Avatar for bhagawatshinde

Hi anybody can help me , i want to connect the sql serverdatase from local machine in windows application. i am trying this like this way but it give me an error my connection string [CODE] return new SqlConnection(@"Data Source=68.71.135.2,2121;Initial Catalog=DBTest;User ID=myId;Password=mypass;");[/CODE] how i connect to server database. Thanks in …

Member Avatar for bhagawatshinde
0
230
Member Avatar for zachattack05

If I have 2 or more tables and I need to have another table that is related to the data in those tables...how would I achieve that? As an example: Table A and B have totally different data and aren't directly related at all. I would like Table C to …

Member Avatar for lolafuertes
0
224
Member Avatar for bradploz

How do you insert label values to database? here is my code.. [CODE]Imports System.Data.OleDb Public Class frmemp Dim con As New OleDbConnection Dim dbAddNew As New OleDbCommand() Private Sub frmemp_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim ds As New DataSet Dim dt As New DataTable Dim …

Member Avatar for hericles
0
418
Member Avatar for brandonboyce

I am populating a table with information from a database, one of the values is a rating 1, 2, 3, or 4. I made it so that depending on the value in the database the radio button with the corresponding value is selected. But I am having problems figuring out …

Member Avatar for devindamenuka
0
3K
Member Avatar for z_zendegi

hi I have a program in c# that have connection string for network use to connect to sql server 2008,it works correctly until our company make DC server and join all computers I change my connection string,then if I log on to my computer(my computer is a server) from any …

Member Avatar for Momerath
0
115
Member Avatar for aldeene

I am developing a program where I will save the information from a "Log file" from an external application.. example: I have a biometrics system that reads and saves the log file to disk, once the user logs to the system, the system will save the file to a log …

Member Avatar for adam_k
0
131
Member Avatar for Red_Indian

Hi, I have 20 rows in a table and I want to update 10 of them only. I am using MS SQL. Any ideas please. Cheers

Member Avatar for prit005
0
105

The End.