9,022 Topics
I have 1 data gridview. in that first is ID column . for that i assign a auto index number with sql server (isidentiyt). the next colomn is response id, for this column also i want autonumber id like 1,2,3,4..... . i see we cant assign to index identity with …
These are just the tables.. STU(SSN [pk], Name, Addr) CLASS(Crs_id[pk,fk], Term[pk], Sect[pk], Fac_id[fk]) COURSE(Crs_id[pk], Description)CLASS_TAKEN (Stu_SSN[pk,fk], Crs_id[pk,fk], FAC(SSN [pk], Name, Dept) Term[pk,fk], Sect[pk,fk], Grade) CORE_CRS(Crs_id[pk,fk]) * term indicates year(4) & semester(1) (i.e, 20091 = Sp 2009) List the names of all faculty members who have taught every course in the …
Hi, I have managed to get a nested query to work partly, but i need to somehow add another nest, which i cannot get to work. To explain more, i wanted to firstly find records that did not exist in another table, to which i used the following [CODE] SELECT …
I am developing a vb.net application that retrieves a recordset from a sql database with a large amount of records (30000 records) I need to process each record separately according to its contents. Is there a way of doing this in a faster method than iterating through each record?
Hello! :) I have a small issue with an AFTER UPDATE Triger I implemented on one table of my db. In my trigger, I do some validation and update others (not in inserted or deleted) rows of my table. Thoses rows are updated but are not triggering my trigger (similar …
This set of code below shows all SQL Server Agent jobs that have failed for the date 200.03.29. The run_date column is an integer, but I want to run the code in such a way that the resultset is automatically generated for the day before the current date. The code …
Hiiii alll At present am doin a small project in windows application with C# as its code behind language. Now am in problem that i'm not able to connect sql server with my application. Its throwing an error that[COLOR="Red"] "sql default settings does not allow remote connections. connection can not …
-I am using vs2008's table adapters for a DAL for several tables. -I have a computed field (FirstLastName) in my Lead table. -If I try to generate insert/update logic, the sql aborts when it tries to update the computed field. -So I dropped the field from the primary select, with …
Some of you may have seen my earlier thread “PasswordHash NULL problem”. I’ve started a new thread because investigation has shown that the problem is actually quite different than I previously stated. Also please note that this is unrelated to another of my previous threads, “dataAdapter.Update problem”, which incidentally has …
hey guys. . .im having a problem with my update code in vb.net.. . look at my screenshot attachment the column time_out is the problem. . . here's the code i used [CODE] Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim timeout As String Dim …
When I try to save a new (inserted) record in an SQL database, I get the following System.Runtime.InteropServices.ExternalException message: [QUOTE]Cannot insert the value NULL into column 'PasswordHash', table 'AdventureWorks.Person.Contact'; column does not allow nulls. INSERT fails. The statement has been terminated.[/QUOTE] I have to either find out how to insert …
i have a list of data from database, when i click on an item from this list the value from list should go to the database through SQL criteria, but it doesn't happen, it throws "Data Type mismatch in criteria expression error" (error is hightighted with red in code part). …
When I try to save a new (inserted) record via the following code: [CODE]DataRow row = dataTable.Rows [currRec]; // update data in DataSet from data entry WinForm row.BeginEdit (); row ["Title"] = txtTitle.Text; row ["FirstName"] = txtFirstName.Text; row ["MiddleName"] = txtMiddleName.Text; row ["LastName"] = txtLastName.Text; row ["Suffix"] = txtSuffix.Text; row …
Most databases have multiple users. For these databases it is a good idea to auto-increment the identity column. I understand that an SQL identity column is not incremented until the newly-created record is inserted. I guess this means the identity column is incremented when you actually reconnect to the database …
hii all, im trying to connect remote sq server using in c++ using CDatabase class. im getting an sql error Connection Failed SQL State '01000' SQL Server Error 14: [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Invalid Instance()). SQL State '08001' Connection Failed SQL Server Error 14: [Microsoft][ODBC SQL Server Driver][DBNETLIB]Invalid connection the …
I'm running into problems with my XML format when I generate it with SQL. I'm using SQL Server 2005. I have a query that uses FOR XML PATH that will return XML for me but it does work well with the formatting. I'm not a XML guru but when I …
I just got started with ms sql server2000,and I need a big favor from the the house,which is:please what softwares do I really need to install to get started?
Hi guys I have a problem in my project.Below I mention the coding I wrote it for testing purpose. In below coding the second while loop never run,only [CODE] SqlDataReader reader = DbCon.Get_Invoices(); int x = 0; while (reader.Read()) { x++; [B][COLOR="Red"] 1[/COLOR][/B] } MessageBox.Show(x.ToString()); chart2.DataBindCrossTable(reader, "ExecutiveCode", "Date1", "Total", ""); …
I need to merge 2 notes fields in a sql database This select script gets me what I need how do I merge notes into Technote, I have a function to filter out the characters in the phone number that's what the stripped is [CODE]Select db1.dbo.customer.cust_no, db1.dbo.customer.Phone_home, db1.dbo.customer.technote,db2.dbo.customers.notes from db2.dbo.customers …
Hi, I'm using SQL 2008 Express with a multi user VB.NET Windows application. Do I have to add each user to the SQL user account? Does NT Authority\SYSTEM work? I do not know how this works. So far I have NT Authority\SYSTEM in the Security-Logins of the Server. But do …
Hi Once I complie below coding part,it give me error meassage.The Error Meassage is Error . [COLOR="Red"]The name 'CurrentOutLet' does not exist in the current context[/COLOR] BelowI write my coding [CODE]. public SqlDataReader Current_outletReport(string code, string startdate, string enddate) { try { SqlDataReader CurrentOutLet; SqlConnection con; string str = "SELECT …
I have the following code that executes an sql stored procedure and I pass a customer name and customer contact to the procedure to use to create a new record in a table. When I execute the stored procedure in sql it inputs the customer and contact in the new …
Hey Guys, I was wondering could someone point me in the right direction. Getting an error: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM. What my code is doing is checking for the earliest date in one table(tblBookedTimes) and assigning this to earlydatestart. Then I want …
Hello there, I am in the need of some serious guidance/advice/direction. I am comfortable and familiar with creating DB's, however my knowledge/skills/abilities simply revolve around MS Access. I have been approached by someone that wants their existing web based DB to be overhauled. They have provided me with a very …
hiii all, iam doing a project in asp.net and the back end is sql server. so when i tried the connection code it gives me an server error "Cannot open database "C:/Program Files/Microsoft SQL Server/MSSQL.1/MSSQL/Data/projdb.mdf" requested by the login. The login failed. Login failed for user 'YOGESH\Owner'. "
Hi, I have developed a VB.NET Windows multi-user database application. This application is used within the company. The back end is SQL 2008 Express. The connection string is given in the application settings, so obviously it goes to the app.config file. This was done to change the SQL server in …
Hi, I'm working on a multi user VB.Net windows application with back end as SQL Server 2008 Express. The SQL Server is installed on the intranet network drive. This is the connection string I will be using. Is this correct? Data Source=.\SQLEXPRESS;AttachDbFilename=Q:\Database\PrintDB.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True Thanks
hi friends i am connecting to sql server with java through eclipse as IDE. here's my base connectivity class to sql server public class BaseDAO { public Connection getConnection() throws Exception { String userName = "aman"; String password = "password"; String url = "jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=amandb"; // step 1 Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance(); // Step …
Using Visual C# 2008 Express and SQL Server 2008 Express, I would like to insert new records into database "AdventureWorks", table "Person.Contact". To my surprise, this table's int-value identity column "ContactID" does not appear to be auto-increment. I don't know how to confirm for sure that this is so. (I …
hi,, it seems thet i am posting too much inthe forum .what to do.i am busy with a project to finish.. ye, i just wanted to ask i have a money datatype in my table SPAINFO in sql server2005 i have done the connectin and its working fine.. the problem …
Hello, I spent hours wondering why this statement doesn`t work. I would like to insert record in a table if it doesn`t exist already.If record exists then a message will come out saying record exists. The values for the record to be inserted are current selection in combos on a …
Hi, I'm stuck in a gridview operation. Baiscally i have an sql that select filesize from database. I need to convert the file ti Giga byte. So i cant find a method to do it in sql, what i plan to do is. Get the result from the sql, convert …
Hi, I got a table with datas that has alphanumeric values like : 1230-544,15C5487,132DE78. Now i need to extract only integers fomr these datas and convert to bigint. The other characters have no impact in my query. Is there way to produce a data like that? Thanks in advance. Mouli
I have an existing table: [code=sql]CREAT TABLE Course (CourseNo int NOT NULL PRIMARY KEY, CourseName varchar NOT NULL StudentNo int NOT NULL REFERENCES Student (StudentNo)) [/code] Is it possible to code the following change in T-SQL: Introduce a new column called CourseID (int NOT NULL) and make it the PK? …
hi i would like to write a trigger for the basic operations on a table : insert, delete, update. i know the basic syntax: [CODE=sql]create trigger on tbl_MyReports for insert,delete,update as[/CODE] my question is how can i know which rows changed ? if i inserted or deleted or updated a …
All, Have a form with over 189 controls on it and trying to automate the save. I currently use the following script to init the fields: [code] On Error GoTo Err_Msg For Each ctl In Targetform.Controls ' 100 = Label, 106 = CheckBox, 109 = TextBox, 111 = ComboBox Select …
I can read in an SQL table ("Person.Contact") from AdventureWorks and step through it one row at a time, but when I try to save a record, either one I'm inserting or one I'm editting, I get the following exception: Incorrect syntax near ','. Must declare scalar variable "@ContactID". Here's …
Hello guys. I hope you can help me with this problem. I have created a table (office) with two fields: id and location. Id is set to autonumber. I want to fill the table through a form which displays the id and takes the location. The program works fine but …
Hi, I would like to replace the ACCESS with SQL Server 2000 enterprise edition. But I have the following problems: 1. While installing SQL should I install as Server or Client. 2. How to connect the SQL with VB 6 for saving,retrieving, modifying data using ADODB connectivity. Pl help me …
hi. my thread title seems strange but its really about comparing unlike values as an output. I want all values that are not LIKE the other values. To make things clearer. Here's my query: [ICODE]SELECT Records.[Officer ID], Records.[Plate Number], Records.[Violation Commited], Violations.[Violation Code], Records.[Street Name], Records.[City of Apprehension], Records.[Vehicle Category], …
Hello everyone! This is my first post on DaniWeb. Recently I have been working on a chart tracking system that utilizes MSSQL for a doctors' office. Now that I have finished it, I need a good way to deploy it across 50-100 computers in the office. The program will certainly …
Hi every body plz inform me that how to take back up in vb.net using sqlserver. thanks for cooperation
just wanted to know how i can input a search facility to my webpage, which is on short courses. i want it to retrieve information from my database to display on my web page. my webpage is linked to an MS Access database. if anyone could help me u would …
I am getting the following error sometimes. When the user load gets heavy I'll receive the following error. Would puting cftransaction around my update statements work? ODBC Error Code = 40001 (Serialization failure) DiagnosticsODBC Error Code = 40001 (Serialization failure Microsoft ODBC SQL Server Driver SQL Server Transaction (Process ID …
Hi All, I am new to c#programming, actually I'm supporting our shop floor application, It uses a c# and MS SQL 2005 as a back-end. My problem is that when my server uses a time zone (GMT + 8, +7, +6 etc..), the application works fine but when I try …
what's wrong with the code, it doesn's display the data based on the SQL query: Private Sub cmdSearch_Click() On Error GoTo Notfound squery = "": squery = "Select * from tblStation where Station like " & txtStation.Text & "" Call ExecuteCommand With Me .txtStation = rs!Station .cboCluster = rs!Cluster .txtArea …
hi, there..im having difficulties instaalling the microsoft SQL server. i need this to connect to the ASP.NET application.I am getting results that there is a 'cluster node failure' and I am having a lot of difficulties in encountering this. basically, i don't know where to find this cluster properties in …
HI I am very pleased to join this forum I am new to SQL programming , I am facing a challenge I need to copy the data from one table in one sql server to the same table in enother SQL Server From Server A table (Employee) To Server B …
Hello, I created command object in DataEnvironment. Now I wish to change to command object's Sql Text since table name gets changed depending upon year of working.
I have an application that needs the report server URL for that application's sql instance. Based on the fact that it is an instance the report server URL should be: [QUOTE]http://servername/reportserver$InstanceName[/QUOTE] When I enter the above, on the server that has the SQL server instance, the web-page displays the report …
The End.