9,022 Topics
Hello I had a question about MS-SQL. I am trying to write a query which will select a group of values from several tables (prodId, Amount, BreakLevel, TotQuantity, Price) There are several amounts associated with different break levels. i.e. a break level of 15 might get an amount of .10, …
Is something like this possible: [CODE=C#] int MyParameter = 3356; DataTable x = new DataTable("CommandParams"); x.Columns.Add("ParamName"); x.Columns.Add("ParamType"); x.Columns.Add("Object"); DataRow y = x.NewRow(); y["ParamName"] = "@SomeParamName"; y["ParamType"] = MyParameter.GetType(); y["Object"] = MyParameter; SqlCommand z = new SqlCommand(); z.Parameters.Add(new SqlParameter(x.Rows[0]["ParamName"], (x.Rows[0]["ParamType"])x.Rows[0]["Object"]); [/CODE] I'm trying to come up with a method that can …
I have a Subjects table with a field Prerequisites, which contains data similar to the Subject IDs in the same table. So for example a subject4 may have the prerequisites subject2 and subject3. The contents of the Prerequisite field are delimited by ORs and ANDs, meaning if there are more …
Hello... I'm a student who's only taken some basic coding classes. My project might be a bit ambitious for my skills, but I'm getting stuck on one small issue. I built an Access database for our personal library. I'm building a small application that will: 1. Display all records of …
What is wrong with this code?: [code] <%@page language="vb"%> <%@import namespace="system.data"%> <%@import namespace="system.data.oledb"%> <script runat="server"> sub page_load(o as object, e as eventargs) dim conn as new oledbconnection( _ "Provider=microsoft.jet.oledb.4.0;" & _ "Data source=c:\users\asus\desktop\banking.mdb.mdb;") dim ds as new dataset("mydataset") dim objcmd as new oledbdataadapter("select * from tblusers " & _ "where …
I have a query that has two counts in an if statement. I need the query to return all values even if they are null once equated by count. I have tried the NZ function to no effect. Any help would be greatly appreciated. [CODE]SELECT REPRESENTATIVE.Country_id, IIf([CONTESTANT.Team_id] Is Null,COUNT(*),COUNT(*)-1) AS …
Hi i am trying to connect to an SQL Server using mssql_connect, the problem is that it is giving me a fatal error. I ran a script to see if the mssql functions are installed and seems like they do not exist. I read around and seems like i have …
Hi All, Can anyone tell how the import and export to and from Auto desk Revit works and where I can find out more about the procedure of Linking the drawings to a SQL database that when you edit the drawing it updates the tables and when editing the tables …
Hi, I'm developing an application for my psing SQL Server 2005 as database and VB.Net 2008. Ive created the form and successfully connected all text boxes etc. Using the code, I have managed to open the database and fill the dataset. However when i BIND the Datagrid datasource to the …
Hi I new here I have a couple of questions. I am trying to authenticate login and password and Im getting a few errors. 1. first is the db error in my dbqueries class file. I am using sqlce for testing purposes. [code] public DataSet Login(string Username, string Password) { …
I have the following two sprocs: [CODE] USE [Ecotech] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[Ecotech_AddUser] @aspnet_id uniqueidentifier, @last_name nvarchar(255), @first_name nvarchar(255), @address1 nvarchar(255), @address2 nvarchar(255), @zip nvarchar(10), @city nvarchar(255), @tlf_mobile nvarchar(16), @tlf_home nvarchar(16), @tlf_office nvarchar(16), @country nvarchar(16), @email nvarchar(50), @status int output AS BEGIN …
In my ASP.NET project i have 3 web forms. Login.aspx, Signup.aspx and Default.aspx. I'm using Custom Membership Provider for the login and signup controls. When a user logs in a sessions is called. How can I save all the session variables and values into MS SQL and that particular user's …
i want to have 2 listbox. the first listbox is for the Main category and the other one is for the sub category. and by using sql 2005 for the database. help me plz. . . for example my main category for the 1st listbox is ADIDAS CONVERSE NIKE SKETCHERS …
Hi guys, I'm trying to model inheritence in a SQL database. I have a working structure but I'm wondering if theres a neater way of doing this. The database is to store product information. A product is made up of multiple parts and each part is made up of components. …
i created a program for network chat in C # with sql server 2005 database.Here.. i created two setup files.One for Administrator systm and another for client system. Admn sys contains sql database and all stored provcedures.And i installed sql servr in admn systm. Client systm is just accesing admin …
Not sure if this actually qualifies for this forum so please by all means move this topic to the appropriate place if it isn't. I'm writing a C# Windows Application (not a web app) and it uses either an SQL or Access database to store its data for multiple network …
i created a program in c# with database sql server 2005.it worked in windows xp.but i don't know how to install my software in windows 7 .i coudn't install sql server2005 or sql servr 2005 64 bit in windows 7. help me plz ..very urgent
please guide me to connect java project to sql.Code snippets are welcome.
I need to write code to have a search box that will search a mssql database.
Hi all, first i would like to apologize if my question seems out strange or not well define, but I've never do this before. here it is my problem: I have a txt file with a delimiters. I have a XML file that should be used to load the data, …
Hey :D I'm currently writing a software where users pick out seatings from auditoriums. The tables will contain seating statuses of auditoriums, which could update quickly. I was thinking of using a thread to repaint the contents, however as the software could be used by many users on the same …
Hi All I am getting above error when I am trying to build the project.Could anyone help me out ? Error: 'NCCDAL.clsDataAccessLayer.fncreateCmdObj(string, System.Data.SqlClient.SqlParameter[], System.Data.SqlClient.SqlTransaction)': not all code paths return a value' Code: public static SqlCommand fncreateCmdObj(string spName ,SqlParameter[] commandParameters,SqlTransaction transaction) { SqlCommand command ; try { command = new SqlCommand(); …
i have empty datagridview. Now i need to enrty the multiple values in datagridview after that when i click the save button i need to store the all values in sqlserver using c#. Please help
I have the following data in a field in my SQL table. I want to break up the data in this field so I can use it in reporting: Sample records: Record 1: Player: (265613) Miss Linlde M Simonds, Promo Adjusted -> 10.00, Beg. Bal -> 0.00, End Bal -> …
HI Friends i want to do the connective in C# window application with sql server and in that even i want that if client put information in text box's and click on submit the information should go in sql server db and then again if he is putting same information …
Hello everyone, i'm new here but i've been having a problem lately with a sql query inside the code i'm writing, and i don't know what else to do. I've been trying to retrieve data from a table, and i want to use a variable for the "where" field in …
Hi all, Fairly new at SQL, and running into the following problem. I am trying to create a query to count the number of unique fields in a column and display, but can't seem to get it right. For example, each day there are x number of entries from y …
I cannot find an article for the life of me that explains what I want to do, which seems so simple to me. We have an SSIS package we use to run some processes against our SQL server 2008. Each time we run it, we need to edit some of …
hi experts i m using ms access data base as back and in my new project, this is my code Imports System.Data.OleDb Public Class st_name Dim cmd As OleDbCommand Dim dr As OleDbDataReader Dim thismode As Integer Private Sub st_name_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load tcon() …
Hi All Developer, I am waiting for Query that will Converting full date into AM/PM with Time. only. in Sql Server. For Example: 2010-06-24 16:00:00.000 will be giving result -->04:00 PM 2010-09-24 01:00:00.000 will be giving result -->01:00 AM Wait For your Reply. Thanks. Dhimmar
I just wanted to know the following things if u can just help me. I made a website in Visual Studio 2008 and used the database provided by the VS [I dont know which version is this]. That website runs successfully on the machine having visual studio[As in that i …
i having a problem with my website i cannot login via my connection string i get a error say: ================================================================== Login failed for user ";. The user is not associated with a trusted SQL Server connection. Description: An unhandled exception occurred during the execution of the current web request. Please …
I want to know how to transfer between two server a data table without using the SPROC for link them.
Hi, I am using visual studio 2008. I have a winforms app that takes data from an xml doc. I store the data in a ms sql database that I have created via a stored procedure. When Irun the app the data from the xml doc is captured and put …
Hi everybody.. i've created one SSRS in that i've connected to the database having four fields.. now want i want is to calculate the salary page by page and at the last grand total.. i've kept one extra column in table and kept one running field and made it as …
Hi guys, Please help me when i install my application on clients it only connect with one user like Naveed/Password on domain but when i login on domain by using other user it gives me connection error what should i modify in my connecting string. [CODE]"PMS.My.MySettings.ConnectionString" connectionString="Provider=SQLOLEDB;Data Source=ITS;Integrated Security=SSPI;Initial Catalog=Payment"[/CODE] …
hi All, I am new to this and first time doing this kind of work. i have created a web site in visual studio 2008 with database provided by the visual studio. Now i have that database but i have to deploy that website and use database as sql server …
I'm on a shared computer and i'm using sql server 2005. I'm in a limited user account, everytime I click a database it says 'database not accessible', also there's a error 916 when I tried attaching a database. How to fix this?
Good morning all; This one is blowing my mind and I could use a little expertise. I'm retrieving data from an Excel sheet, using a simple SQL query using a textbox as input to my variable. It works great when I enter an integer to search for (such as 213 …
I'm totally new to this, as will be evident, and I can't figure out the syntax for what should be the most basic code. I'm just trying to get a piece of data from a SQL database and store it in a variable. From various book and websites, I cobbled …
Hi, I have a DataTable oDT. oDT is populated from SQL Server with 6 columns including a column "bAAA" of varbinary(200) I have a function fx(ByVal byteArray As Byte()) as String I would like to add a calculated column to oDT something like this: [code] oDT.Columns.Add("sAAA", GetType(String), fx(bAAA)) 'bAAA is …
Hi, I am working on querying a specific value from my xml file. Below is what I have so far. When running the entire script I get the error "Incorrect syntax near 'varchar'". Thanks -- Declarations needed to run sp_xml_preparedocument. This will create XML image. Declare @idoc int Declare @doc …
I need to build a program which will upload a .txt file to the server, will read it using StreamReader and the populate an existing SQL table with the concent. The first Page (profiles) does exactly that and works perfectly.. It has a text delimiter and splits the text into …
hi, Am having a problem Inserting into SQL 2008 database using stored procedure from a php webpage. My Stored Procedure is: [code=text] Create PROCEDURE [dbo].[udp_AddContact_Insert] @Contact_ID int, @Client_ID int, @STD varchar(10), @Tel varchar(20), @Mobile varchar(20), @EmailAddress varchar(100), @FirstName varchar(20), @LastName varchar(20), @Title_ID int, @Position_ID int, @User_ID int, @SourceURL varchar(1000), @PositionText …
i am inserting 5 different things including passport to sql dbs. to my surprised, other items were inserted but the passport cell; what i see was --'binary data'. and the exception says OBJECT CANNOT BE CAST FROM DBNULL TO OTHER TYPES. pls some one should help me out here.
the stored procedure is within a transaction. I want to get the inserted values after calling the stored procedure. My problem is, I don't know if that is possible because the transaction is not yet commited. Help.
[code]<%@ page import="java.sql.*"%> <html> <body bgcolor="pink"> <% String user=request.getParameter("us"); String pass=request.getParameter("pa"); String a=request.getParameter("na"); String a1=request.getParameter("no"); String a2=request.getParameter("el"); Connection con=null; Statement stmt=null; ResultSet rs=null; try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con=DriverManager.getConnection("Jdbc:Odbc:Data405"); stmt=con.createStatement( ); stmt.executeUpdate("Insert Into stud(username,password,nam,nos,elg) Values('"+user+"','"+pass+"','"+a+"','"+a1+"','"+a2+"')"); out.println("File inserted"); } catch(Exception e) { out.println("error"); } con.close(); %> <a href="http://localhost:8080/maya/login1.jsp">go back</a> </body> </html>[/code] I can …
can anyone tell me whether i can access databases using c++ i want to connect to ms sql in in c++ program. i hve to create tables in MSSQL using data available in c++ program. very urgent thanks geeta
I want to use java to access microsoft sql server express remotely.i have allow remote connection in the database that i have.and i allow port 1433 through firewall. the code is: [CODE] import java.sql.*; import java.lang.*; public class Jdbcconn { public static void main(String[] args) { try { //load the …
Hi all, I am trying to get a SQL Server statement to work for a class I am taking on MS SQL Server. Here is what I am supposed to do; 1) Write a SQL query that joins two tables in the example database and uses BETWEEN to restrict record …
The End.