| New unique id (4 replies) |
| ASPFriends.com 'ngfx-sqlclient' list |
| Hi I'd have a table with a integer(IdNr) and it's not a counter... I like to find "next" avaible ID number to use. Like this...Loop from 1, if that IdNr ain't exists then im free to insert a new row else if 1 is taken then i need to try with 2 and so on.... I have tried with a CURSOR but that didn't helped me..... Anyone got a suggestion how i can solve this? Thanks! /Tobias |
|
| MSDE (4 replies) |
| ASPFriends.com 'ngfx-sqlclient' list |
| Hi all, I want to apologize for asking the same question twice, but unfortunately the moderators of these lists are not very helpful when it comes to finding older posts... I am trying to import a database into MSDE and I can't remember for the life of me how to do it. I have a.sql file and all I need to do is add it to the existing SQL server data base on my local system. Any help will be appreci... |
|
| Install MSDE to mixed mode? (2 replies) |
| ASPFriends.com 'ngfx-sqlclient' list |
| How do you install msde in mixed mode? Is there a switch I can put on the end of the install? Ie install /mixedmode Thanks |
|
| speed up SQL query on MSDE (9 replies) |
| ASPFriends.com 'ngfx-sqlclient' list |
| Hello, I'm using this query on MSDE 2000: IF EXISTS (SELECT TABLE NAME FROM INFORMATION SCHEMA.VIEWS WHERE TABLE NAME 'tmpview') DROP VIEW tmpview GO CREATE VIEW tmpview (id, orderid, productcode, colorref, v8, groupname) AS select distinct i.id, i.orderid, i.productcode, i.colorref, i.v8, p.groupname from w orderitems as i, w products as p where (i.productcode p.productcode) GO SELECT groupname, ... |
|
| Connection string for named server instance (2 replies) |
| ASPFriends.com 'ngfx-sqlclient' list |
| Can someone please give me an example for a sql connection string to a names instance of sql server on a machine (ie: myserver/mysqlserver)? The way I did this in classic asp was as follows: strConnect "Provider sqloledb;" & "Data Source server\sqlserver;" & "Initial Catalog db;" & "User Id user;" & "Password funkypassword;" All examples I find refer to a server and sql server being one in the sam... |
|
| Connection Pooling question (6 replies) |
| ASPFriends.com 'ngfx-sqlclient' list |
| Moved from [aspngdata] to [ngfx sqlclient] by Cain Marco juggernaut@aspelite.com I'm having a little trouble understanding connection pooling. I seem to be having trouble reusing connections in my pool and I'm hitting the limit (right now I have it set at 100). I thought if the connections used the same connection string, it could reuse the connection? Here is a section of one of my objects that o... |
|
| Authentication (3 replies) |
| ASPFriends.com 'ngfx-sqlclient' list |
| Hi there, My name is Pascal and I am new in ASP.net, I am trying to build up an application and I am not strating very well as my first Login.aspx page already gives me some headaches. What this error message means exactly? What should I do at this stage? Thanks and regards. Compiler Error Message: CS0117: 'System.Data.SqlClient.SqlCommand' does not contain a definition for 'ExecuteRow' Source Err... |
|
| Not Answered: Connection Pooling question (5 replies, VIP) |
| ASPFriends.com 'ngfx-sqlclient' list |
| Moved from [aspngdata] to [ngfx sqlclient] by Bob Levittan blevittan@hotmail.com I'm resending this because I'm not sure it went through the first time. Thanks. I'm having a little trouble understanding connection pooling. I seem to be having trouble reusing connections in my pool and I'm hitting the limit (right now I have it set at 100). I thought if the connections used the same connection stri... |
|
| populating a dropdownlist from a database (4 replies) |
| ASPFriends.com 'ngfx-sqlclient' list |
| Moved from [aspngvs] to [ngfx sqlclient] by Clint Barton hawkeye@aspelite.com Is there a way to populate the values of a dropdownlist using selection criteria from a view? Basically I have a view that shows all the user table's columns. I want to populate a drop down box with the column names of a table when the user selects a table from another drop down. A normal static way would look like this ... |
|
| UNANSWERED - using WRITETEXT with C# (9 replies) |
| ASPFriends.com 'ngfx-sqlclient' list |
| I need to use WRITETEXT to update some information in a ntext column, but want to try to avoid using a stored procedure because the C# code that I am using is in a control that can be used for a multiude of tables and thus I don't want to have to create a sp for each table. So far I have come up with the following code: WRITETEXT tablename.columnname (SELECT TEXTPTR(columnname ) FROM tablename WHE... |
|
| session variables and SQL (2 replies) |
| ASPFriends.com 'ngfx-sqlclient' list |
| This could be an easy one for what I know. I'm new to programming (just starting school) and I am adding a SqlDataAdapter to a aspx form with the Data Adapter Configuration Wizard. My web application has a few session variables and I would like to constrain the data with a WHERE clause in my SQL statement using those session variables however if I just put them in a WHERE clause it gives me errors... |
|
| Printing Stored Procedures and Table Design (3 replies) |
| ASPFriends.com 'ngfx-sqlclient' list |
| Hi there, Can anyone tell me how to print stored procedures and table designs? Regards, Kevin designMe Ltd. Birmingham Telephone: 0121 693 5778 Facsimile: 0121 693 5779 York Telephone: 01904 466643 Facsimile: 01904 610718 This message may contain confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy... |
|
| Quick question about "inserted" table on TRIGGER (4 replies) |
| ASPFriends.com 'ngfx-sqlclient' list |
| I'm building a TRIGGER (my first) that will make sure the price for a line item is calculated properly in the database [i.e. Price Cost*(1 markup)]. So here are two questions: 1. What is the best way to prevent the trigger from triggering itself when it updates the Price field for that line? 2. If something causes several records to change (i.e. the markup on all the lines are changed) Does the "i... |
|
| DataSet with Parent/Child tables (2 replies) |
| ASPFriends.com 'ngfx-sqlclient' list |
| Greetings, This might not be a pure SQL request, rather a SQL/DataSet/DataGrid combo. Goal: Get data from SQL db through multiple SQL statement, produce a dataset with corresponding tables, plugging it to a datagrid and presenting data through basic boundColumn names. Progress: I Have been trying to produce a DataSet with multiple tables as DataSource for a DataGrid (web). I managed to Fill a Data... |
|
| SqlDataReader (6 replies) |
| ASPFriends.com 'ngfx-sqlclient' list |
| Copied from [aspngcs] to [ngfx sqlclient] by Charles M. Carroll charlesmarkcarroll@yahoo.com Hi All, I am trying to read data from my SqlDataReader in C# and am running into a major problem. In VBScript I use SqlDatReader.item("Column Name") And it works 100%, but I can't seem to get it to work in C#, the closest I have gotten is SqlDataReader.GetString(2) Which works only for a [varchar] field an... |
|
| can't get multiple result sets into a DataSet... (4 replies, VIP) |
| ASPFriends.com 'ngfx-sqlclient' list |
| Copied from [aspngdata] to [ngfx sqlclient] by Clint Barton hawkeye@aspelite.com I am using the code below to try to get a handful of result sets (returned from a single SQL 7.0 sproc) into distinct tables in a DataSet. I get an error when the Fill() tries to happen: Value cannot be null. Parameter name: dataSet. The result sets being returned are not simple SELECT * FROM PersonEmail queries, they... |
|
| DataReader / DataTable question... (4 replies, VIP) |
| ASPFriends.com 'ngfx-sqlclient' list |
| Copied from [aspngdata] to [ngfx sqlclient] by Clint Barton hawkeye@aspelite.com I have a SQL sproc that returns 10 result sets. I grab it into a DataReader. I want to loop through the result sets, and for each one, dump the result set contents into a separate DataTable. I can't find a DataReader equivalent to the DataAdapter Fill() method. Can someone show me how this can be done? TIA, Francesco ... |
|
| SV: how best to manage a SqlConnection throughout a page? (2 replies) |
| ASPFriends.com 'ngfx-sqlclient' list |
| I tend to publicly Dim the SqlConnection outside the class as well as the connectionstring (web.config/appsettings). As long as you explicitly open and close the connection on each trip to dB, I can't really see how this should be harmful. Regards/Halsningar Andre Colbiornsen Sonnenburg Communications Bergsgatan 3, SE 211 54 Malm F6 Sweden Tel.: 46 (0)40 97 78 80 Fax.: 46 (0)40 97 78 80 Mob.: 46 (... |
|
| Strange Problem In SQL or ASP.NET (2 replies) |
| ASPFriends.com 'ngfx-sqlclient' list |
| I am having a strange problem I am inserting a record from my page using stored procedure. I have a stored procedure called "AddCurrency" I am using the following code which I have compiled as DLL Public Function AddCurrency(ByVal currbig name As String, ByVal currsmall name As String, ByVal curr conv As String) As Integer Dim myConnection As New SqlConnection(ConfigurationSettings.AppSettings("MM... |
|
| Nulls (7 replies) |
| ASPFriends.com 'ngfx-sqlclient' list |
| !DOCTYPE HTML PUBLIC " //W3C//DTD HTML 3.2//EN" HTML HEAD META HTTP EQUIV "Content Type" CONTENT "text/html; charset us ascii" META NAME "Generator" CONTENT "MS Exchange Server version 5.5.2652.35" TITLE Nulls /TITLE /HEAD BODY P FONT SIZE 2 Hi , /FONT /P P FONT SIZE 2 How do I /FONT /P P FONT SIZE 2 If I want to select all the values from a table and show them all and LEAVE out the null values...... |
|
| Sqlconnection.Open... TCPClient.connect timeout problem (7 replies, VIP) |
| ASPFriends.com 'ngfx-sqlclient' list |
| Moved from [aspngdata] to [ngfx sqlclient] by Cain Marco juggernaut@aspelite.com Hi everyone, I am working on a VB.net code where in I try and open an ADO.net connection through the Class SQLConnection.open. Now this function uses the timeout property in the connection string to time out the connection attempt. I want this function to return fast if the network is not available. In that case I hav... |
|
| Date (15 replies) |
| ASPFriends.com 'ngfx-sqlclient' list |
| Hi all, I am trying to use a Select statement to get a date from a calendar in this format 05/21/2002 then I am trying to do Select Myfields from Mytable where Mydatefield '05/21/2002' And I get nothing and I am sure that date is there but its stored as 05 21 2002 how can I get around this? Thanks This email and any files transmitted are confidential and intended solely for the use of the individu... |
|
| Populating Drop Down List (7 replies) |
| ASPFriends.com 'ngfx-sqlclient' list |
| I have a view that called objectinfo that selects the id, Tablename and Columnname from system tables to show the columns of a user table. The below code will populate dropdownlist4 with the correct column Names from the table getcustitem. cmd New SqlCommand("SELECT ColumnName FROM objectinfo where tablename 'getcustitem' ") conn SQLConnect() ' Call SqlConnect to Create the connection conn.Open() ... |
|
| Reusable method in C# to return the results of a Stored Procedure query - Help needed. (2 replies) |
| ASPFriends.com 'ngfx-sqlclient' list |
| Hi, I'm trying to create a reusable method in C# to return the results of a Stored Procedure query. I'm running in to a little difficulty understanding which Data storage object I should use to pass the returned information from my query back through the method to whatever is calling it. So far I have tried to use an SqlDataReader, but this has proved fruitless as the SqlDataReader is Closed befor... |
|
| SV: Reusable method in C# to return the results of a Stored Procedure query - Help needed. (2 replies) |
| ASPFriends.com 'ngfx-sqlclient' list |
| A DataView may well be used. Here is an example in VB.Net but I'm sure u get the drift: 1.' Publicly dim a DataSet and a Dataview Public dstClients As DataSet Public dvwClients As DataView 2. 'The Function Public Function BindMasterGrid() As DataView Dim conFamily As SqlConnection New SqlConnection(strConn) Dim dadClients As SqlDataAdapter dstClients New DataSet() Try dadClients New SqlDataAdapter... |
|