Skip to content
Code Project
CODE PROJECT For Those Who Code

Database

Discussions on database access, SQL, and ADO

This category can be followed from the open social web via the handle database@forum.codeproject.com

17.1k Topics 61.8k Posts
  • Primary Indexed?

    database question
    6
    0 Votes
    6 Posts
    0 Views
    J
    You're welcome. "When did ignorance become a point of view" - Dilbert
  • Citability Codeathon - DC - April 9 - 11 2010

    asp-net csharp javascript python php
    2
    0 Votes
    2 Posts
    5 Views
    C
    You should probably post this in the Get-Togethers[^] forum. It certainly has little or nothing to do with databases. Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
  • Access 2007 - tabbed forms manage own popups

    design question
    3
    0 Votes
    3 Posts
    0 Views
    J
    I am doing this in MS Access 2007. I found something about a property (Screen.ActiveForm) - this probably means that I will have to do my own Form, Parent/Child management. Thanks for the advice on looking about a Child property. I will check into this.
  • convert nchar to datetime in sql server

    database sql-server sysadmin help
    3
    0 Votes
    3 Posts
    2 Views
    W
    You will have to convert your string in a valid datestring first. This should work: declare @d as nchar(5) set @d = '02 12' select Cast('20'+ Right(@d, 2) + Left(@d,2) + '01' as datetime) Wout Louwers
  • Oracle

    oracle help tutorial question
    7
    0 Votes
    7 Posts
    0 Views
    A
    Have a look at this post here[^]. You can get your data but as SQL Plus is just a text editor, you will be unable to view your image. Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
  • Stored Procedure

    database help tutorial question
    3
    0 Votes
    3 Posts
    0 Views
    J
    Web page source is unassociated from SQL server unless you've got one really funky setup. Please elaborate on what you mean.
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • .NET raises Native exception in SQL Compact on WinCE

    csharp database c++ help question
    6
    0 Votes
    6 Posts
    0 Views
    C
    Your code looks good and should execute without problems. Is any stack trace of this error available? (The complete trace from adp.Fill(...) to the access violation would be nice) Greetings Covean
  • Primary key

    12
    0 Votes
    12 Posts
    0 Views
    N
    Well said. I know the language. I've read a book. - _Madmatt
  • 0 Votes
    4 Posts
    0 Views
    I
    Did you even bother to read the previous answer from Mycroft? SELECT dbo.CustomerMaster.BSACustomerKey, dbo.ContactMaster.ContactName, dbo.ContactMaster.BusinessPhone, dbo.ContactMaster.MobilePhone, dbo.ContactMaster.Email, dbo.ContactMaster.FirstName, dbo.ContactMaster.LastName, dbo.ContactMaster.EmergencyMaintenance, dbo.ContactMaster.NormalMaintenance, dbo.ContactMaster.NetworkAbuse, dbo.ContactMaster.IssuedSwipeCard, dbo.ContactMaster.CardNumber, dbo.AddressList.CustomerAddressLine1, dbo.AddressList.CustomerAddressLine2, dbo.AddressList.CustomerAddressLine3, dbo.AddressList.CustomerPostBox, dbo.CityEnumerator.City, dbo.StateEnumerator.State, dbo.AddressList.CustomerCounty, dbo.AddressList.CustomerCountry, dbo.AddressList.CustomerZipcode, dbo.ContactMaster.BmcCustKey FROM dbo.ContactMaster INNER JOIN dbo.CustomerMaster ON dbo.ContactMaster.CompanyID = dbo.CustomerMaster.CustomerIdentity LEFT OUTER JOIN dbo.AddressList ON dbo.ContactMaster.ContactAddress = dbo.AddressList.AddressIdentity LEFT OUTER JOIN dbo.CityEnumerator ON dbo.AddressList.CustomerCity = dbo.CityEnumerator.CityIdentity LEFT OUTER JOIN dbo.StateEnumerator ON dbo.AddressList.CustomerStateorProvince = dbo.StateEnumerator.StateIdentity WHERE dbo.CustomerMaster.CustomerStatus = 1 AND dbo.ContactMaster.Status = 1 ORDER BY dbo.CustomerMaster.BSACustomerKey ASC
  • MS SQL query syntax for full text search

    database algorithms help
    3
    0 Votes
    3 Posts
    0 Views
    U
    Hello, You can use asterisk. SELECT meaning FROM dictionary WHERE CONTAINS(*, '+"wordSearched"+') or SELECT meaning FROM dictionary WHERE CONTAINS(word, '+"wordSearched"+') or CONTAINS(keyword, '+"wordSearched"+') or containstable sample select id, f.[rank], [Name], [Description] from eshop_product inner join containstable(eshop_product,[Description], 'ISABOUT(bike weight(.9), pedals weight(.3) ) ' ) f on eshop_product.id = f.[KEY] or use karsa full text search manager I hope this help you Michal
  • 0 Votes
    5 Posts
    0 Views
    D
    hehe can't say that I have.
  • 0 Votes
    15 Posts
    1 Views
    M
    I have seen a lot of people all over the web with this same problem so I will let you know how I fixed my problem with it and maybe it will help someone! Firstly, go into IIS Manager and click on your website or directory.. on the right hand panel there is a connection strings option - dbl click on it and it will tell you what your default local sql server is set to.. somehow mine got all screwed up so that was part of my problem.. hopefully that is ALL of your problem (some of you anyhow).. ;-) For me it was more complex however.. I was also trying to do personalization for anonymous users. Thus, in my web.config there were two sets of connection strings.. one was labelled thus: <appSettings> <add key="ConnectionString" value="server=localhost;database=caleb.mdb;uid=;password=;" /> </appSettings> ..so I thought I was using MS Access.. but there was another Connection String attribute like this.. Somewhere else I found this kind of connection string.. <connectionStrings> <add name="LocalhostCTP6" connectionString="Data Source=localhost;Initial Catalog=CTP6;User ID=dnn;Password=dnn" providerName="System.Data.SqlClient" /> <add name="DynamicConnection" connectionString="Data Source=localhost;Initial Catalog=CTP6;User ID=dnn;Password=dnn" /> </connectionStrings> <appSettings> <add key="ConnectionInfo" value="server=(local);database=Northwind;Integrated Security=SSPI" /> </appSettings> (see this article[^] If you arent sure which connection string is actually being used by your program, you can use this code.. [^] ..and to complicate things more, an external file can be involved too as it was in my case!! <appSettings file="testlabsettings.config"/> and as if things werent already complicated enough it is possible to add connection strings on the fly at run time see http://www.kodyaz.com/articles/add-connection-string-to-web-configuration-file.aspx[
  • Streaming SQL table data to secondary location

    database help question
    9
    0 Votes
    9 Posts
    1 Views
    B
    This help ! Thanks !!!!
  • MS SQL: how to reorganize identity column values?

    database tutorial question
    20
    0 Votes
    20 Posts
    5 Views
    M
    final update: all done. the correct way on how to do this was: 1) create a new table with the same columns, change Int32 column to Int64 2) script out all keys and indexes from the old table and create them on the new table 3) make sure the DB is in the simple recovery mode 4) INSERT the rows from the old table into the new table in batches, truncating the LOG after each batch. I was also inserting the identity column values, so I have also set the IDENTITY_INSERT to ON before the batch loop. that's it :) thanks for your help, guys. Michal
  • Translate data from one schema to another

    database sql-server help question sysadmin
    12
    0 Votes
    12 Posts
    4 Views
    J
    You've recieved some excellent info from Mycroft. And I agree with him fully. I'd just like to add that memory considerations is a major reason to do the job on the database using SQL scripts. A database is optimised for handling large sets of data. "When did ignorance become a point of view" - Dilbert
  • Sheduling for send Mail

    2
    0 Votes
    2 Posts
    0 Views
    M
    Try rentacoder, they sell their services really cheap, people here are trying to learn to rather than asking for codez. If you are going to do the job look into SQL server scheduled jobs and database email. Never underestimate the power of human stupidity RAH
  • 0 Votes
    3 Posts
    0 Views
    P
    Thanks for the comments. A little more to understand the problem, I'v found that the error message was because of the returned type boolean (@RetVal). -- oracle implementation --====================== CREATE OR REPLACE FUNCTION TEST_ERP_INSERT ( P_SOURCE_CODE IN VARCHAR2 , P_SOURCE_LINE_ID IN NUMBER , P_TRANSACTION_NUMBER IN VARCHAR2 , P_FEEDER_ITEM_CODE IN VARCHAR2 , P_SALES_PRICE IN NUMBER , P_FEEDER_ORGANIZATION_CODE IN VARCHAR2 , P_FEEDER_SUBINVENTORY_CODE IN VARCHAR2 , P_TRANSACTION_QUANTITY IN NUMBER , P_TRANSACTION_DATE IN VARCHAR2 , P_FEEDER_TRANSACTION_TYPE IN VARCHAR2 , P_FEEDER_TRANSFER_SUBINV_CODE IN VARCHAR2 , p_errmesg OUT VARCHAR2 ) RETURN BOOLEAN IS BEGIN RETURN 1; -- EXCEPTION -- WHEN OTHERS THEN -- p_errmesg := 'Error:' || SQLERRM; -- RETURN 0; END; -- calling from sql server --======================== DECLARE @ErrMsg VARCHAR(1000) DECLARE @RetVal SMALLINT EXEC ('BEGIN ? := TEST_ERP_INSERT(?,?,?,?,?,?,?,?,?,?,?,?);END;', @RetVal,'SSP-SALES', 8728, '15059', 'SSP1032', 12,'S', 'S-SALES', 1, '13/MAR/2010', 'S-SALES_ISSUE', '', @ErrMsg OUTPUT) AT ERPUSTG; Any idea? I can't change the returned type because its a different system. The Phantom.
  • project

    database oracle
    6
    0 Votes
    6 Posts
    0 Views
    M
    Rob Graham wrote: lazy idiots So you know anush 6 threads up, hopefully they can gain something from seeing a data structure, without any understanding I doubt a canned structure is going to really help someone. Never underestimate the power of human stupidity RAH
  • Sample datamodel for marketing promotion

    sales
    3
    0 Votes
    3 Posts
    0 Views
    A
    Look Here[^] I don't speak Idiot - please talk slowly and clearly 'This space for rent' Driven to the arms of Heineken by the wife