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
  • 0 Votes
    11 Posts
    0 Views
    T
    if u dont want to use openrowset or bcp then best way is use string builder and then response.write with response.AppendHeader("Content-Type", "application/vnd.ms-excel"); here you can give file name n storage location too. Reasons are not Important but Results are Important. Swati Tripathi modified on Friday, November 20, 2009 3:05 AM
  • Joint Venture Booster (3152)

    csharp html css
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • random alphanumeric generator

    database help lounge
    3
    0 Votes
    3 Posts
    0 Views
    A
    :-O :( ;P :laugh: :confused::~ :| X| :suss::rose::cool::thumbsdown::mad:
  • 0 Votes
    2 Posts
    0 Views
    M
    You're running into UAC issues, they are assuming your SQLACCOUNT has permissions to the program files folders which are locked down unless you are running as admin. I suggest you look into putting your data files into the application data under the user account section (there is an ALLUsers account I am sure), after all this is what it is designed for :rolleyes:
  • 0 Votes
    4 Posts
    0 Views
    M
    I'll back up Bassam, your design sucks (following the theme in the Lounge). ALTERing a stored proc to meet these requirements is nuts. Change your design to generate the SQL in the business layer and exec the sql string in your proc (I hate this as you are left open to sql injection) or parameterise EVERY option the user can select and pass in the data as parameters and build your select in the proc.
  • Help with a trigger or something like that...

    database business help question
    9
    0 Votes
    9 Posts
    0 Views
    A
    Alright, how do I pull all of the appIDs from the select statement into the Stored Proc that I have already built to delete items? The stored proc only accepts one parameter, which is a single appID.
  • Help!!!

    java sysadmin help question
    3
    0 Votes
    3 Posts
    0 Views
    D
    I'm not a Java guy, but I believe the basic approach is something like this: 1) In all of your data access methods, you will need to open 2 connections to the databases; primary and secondary. 2) During your inserts/updates/deletes you will need to make it in both databases. 3) After attempting to make your connection to your primary database, if it fails, you should set some global flag indicating to all of your other database methods should reference the secondary database. If you really want to be fancy, you could implement a round-robin access method for your primary and secondary databases to provide a load balance between them. Extra brownie points ! Good luck.
  • Convert selected table into Tally .

    help
    4
    0 Votes
    4 Posts
    0 Views
    L
    Tally is the most famous accounting software in India.
  • Export a Table to a Excel File

    database sql-server sysadmin help tutorial
    6
    0 Votes
    6 Posts
    0 Views
    T
    you can use 1> DTS Export/Import utility for that please go thru http://support.microsoft.com/kb/319951[^] 2>exec master..xp_cmdshell but for that you need to enable from surface area configuration 3> BCP utility 4> you can use linked server for excel file to sql table. INSERT INTO OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=\\servername\e$\inetpub\wwwroot\game\myexcelfile.xls;', 'SELECT * FROM [scores]') select * from LinkedServerName.DBname.tbl_Stats 5> SSIS package to transfer data from a table in a SQL Server 2005 database to a Microsoft Excel spreadsheet Reasons are not Important but Results are Important. Swati Tripathi
  • query to find engineering student

    database game-dev help
    3
    0 Votes
    3 Posts
    0 Views
    S
    Thanks Biswas, Its working fine Thanks, Sri...
  • [Message Deleted]

    5
    0 Votes
    5 Posts
    0 Views
    D
    Sounds like fun. A sort of Code Project Jeopardy.
  • Document Management System

    csharp database sql-server sysadmin beta-testing
    3
    0 Votes
    3 Posts
    1 Views
    N
    Look into this site document management best practices information[^] :) Niladri Biswas
  • SQL - Server 2008 - Doubling Problem

    database sysadmin help tutorial
    2
    0 Votes
    2 Posts
    0 Views
    N
    Try the queries like this a) select distinct(sup_ref_no),mpr_no from qotemst where sup_ref_no ='103006' b) select distinct(mpr_no),mpr_date from mprmst where mpr_no ='32' c) select distinct(sup_ref_no),mpr_no from qotemst where mpr_no ='32' then try the last Hope it works :) Niladri Biswas
  • Is Oracle 10g works on Windows 7 ?

    help oracle question
    2
    0 Votes
    2 Posts
    0 Views
    N
    This may help u(though for 11g but may give some hints) http://it.toolbox.com/blogs/oracle-guide/oracle-11g-64bit-on-windows-7-ultimate-64bit-29240 But in one more forum I found this answer It wouldn't be work because Oracle 10g supports Windows NT kernel version 4.0,5.0,5.1 means Xp and Vista and designed for that...and windows 7 based on NT 6.1 (6.1.7100 (Release Candidate) (2009-5-5))... may be in future Oracle may be consider to add a update so it will works on Windows 7...but this time it's not...so if you want to work with 10g....then just forgot the 7...and with a Beta,RC it's not safe to work like create valuable database,App....But for testing purpose it's good http://social.answers.microsoft.com/Forums/en-US/GettingReadyforWindows7/thread/3bbabe54-07ec-49f2-ad20-f5b3d11409d6 :) Niladri Biswas modified on Tuesday, November 17, 2009 5:27 AM
  • drop the primary key using a query

    3
    0 Votes
    3 Posts
    0 Views
    W
    I have the same problem too. What are you suppose to use.
  • MSSQL Server 2005 ... Install Issue

    sql-server sysadmin help question workspace
    3
    0 Votes
    3 Posts
    0 Views
    P
    Shameel, Thank you for taking the time to respond. My install was a full Enterprise edition. I did figure out the problem and wish to share it with you (and others) because it is especially important to anyone that has installed a version of SQL 2005 Express or MS Visual Studio 2008, which automatically installs the express version. When installing over a previously installed version, any new install must be done from a DOS prompt using an update command on the command line. If this is not done, it will see the previous version as being successfully installed and will skip the install of the Database server. I have done this and it is now working perfectly. Of course, it took me the better part of a day to figure it out. Hopefully, this might save someone else that trouble. Thank you again and happy coding....Pat
  • 0 Votes
    2 Posts
    0 Views
    M
    As far as I know you can't, stopping the database may leave it in an unrecoverable state. We have had dev databases in this state and had to recover from backups.
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • How to store multiple languages in oracle 10g?

    question database oracle help tutorial
    3
    0 Votes
    3 Posts
    0 Views
    N
    Hi, You can create a Unicode database that enables you to store UTF-8 encoded characters as SQL CHAR datatypes (CHAR, VARCHAR2, CLOB, and LONG). For more info. please look into http://download.oracle.com/docs/cd/B19306_01/server.102/b14225/ch6unicode.htm[^] n3ophyt3 wrote: how can i do the language conversion from HINDI to english ... any sourcecode? Some pseudo code function OtherLanguage2English(value,offset) { var ctrlValue=value; //Variable ctrlValue stores the value of the respective languages depinding on the offset value var english=""; for (var idx=0; idx<ctrlValue.length; idx++)//Loop Until The End Of Text Is Reached { individualChar = ctrlValue.substring(idx,idx+1); //Extracting Charecter 1 By 1 From The String Value var code =individualChar.charCodeAt(0);//Gets the Unicode Value english=english+ String.fromCharCode(code-offset);//Converts From Other Language Values To English switch(offset) { case 2358:document.getElementById('txtEnglish').value=english;break;//For Hindi Value To English } } } Though it is in javascript but this function also converts Hindi to English.. So I thought that you may get some idea. Sorry for not getting an appropriate code for your help. I will update as and when I will get the code for oracle for serving the same purpose. :) Niladri Biswas
  • sql server 2008

    database question sql-server sysadmin
    6
    0 Votes
    6 Posts
    0 Views
    L
    1. Right click the source database, select Tasks --> Backup. 2. Specify a backup location on your hard disk. 3. After the backup process is complete, copy the backup file to your pen drive. 4. On the destination server, copy the backup file to your server's hard disk. 5. From SSMS, right click 'Databases' folder and select Tasks --> Restore. Follow the instructions from there.