Skip to content

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
    2 Posts
    0 Views
    M
    It will be just like any other app that consumes database data, you will make a connection to the database and retrieve the required information based on the user profile and display it in the appropriate controls (PDF viewer and video viewer). In addition to your content storage you will need the user profile information. Never underestimate the power of human stupidity RAH
  • How to replace string with stuff ?

    tutorial question
    5
    0 Votes
    5 Posts
    0 Views
    M
    Let me reinforce what Richard has said, NEVER store date as text/varchar/char, ALWAYS use the correct data type. Text will give you endless problems whenever you try and manipulate the data. The date and datetime data types will give you the tools to manipulate the data easily (not simply it can take a bit of thinking to work out how to achieve a given result). Never underestimate the power of human stupidity RAH
  • SQL Server file locations.

    database sql-server sysadmin question
    5
    0 Votes
    5 Posts
    0 Views
    S
    I can see the advantage splitting the database files onto different disks. I'll mention it to our support team and see if they can fill me in with more information. Thanks for the heads-up about it. If there is one thing more dangerous than getting between a bear and her cubs it's getting between my wife and her chocolate.
  • 0 Votes
    8 Posts
    0 Views
    B
    Hello, I tried the process but an error message is coming.... Error Connecting to database: Authentication to host '192.168.0.101' for user 'root' using method 'mysql_native_password' failed with message: Access denied for user 'root'@'CLT'(using password: YES) ... Where 192.168.0.101 is the server (in which I am trying to connect) ... Where 'root'@'CLT' is the client (from where I am trying to connect) I tried the command... shell> mysql --default-auth=mysql_native_password ... shell> mysql --default-auth=mysql_old_password ... from http://dev.mysql.com/doc/refman/5.5/en/native-authentication-plugins.html[^] but failed... Please help
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • database course

    database com tools tutorial question
    3
    0 Votes
    3 Posts
    0 Views
    V
    Thanks! that already helps ! V. (MQOTD Rules and previous Solutions )
  • FIlestream of varbinary ? ( To Store files)

    database sysadmin question
    4
    0 Votes
    4 Posts
    0 Views
    A
    Thanks +5
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • backup in sqllocaldb

    question database help
    3
    0 Votes
    3 Posts
    0 Views
    D
    Thanks for the reply .but I do not want backup in managment studio. I want the backup (sqllocaldb) to do the coding in Visual 2012. is It possible??/
  • Databse for broadcasting company

    database question workspace
    2
    0 Votes
    2 Posts
    0 Views
    L
    aman wangde wrote: The workflow is the data form nas,ftp,airbox Look up what a workflow is. aman wangde wrote: then it flow towards workstation is it possible ? Nas and FTP, sure, you can write applications to synchronize them with a database. What's an Airbox? Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]
  • 0 Votes
    2 Posts
    0 Views
    L
    ven753 wrote: What could be the problem. It could be the format of the date. Why is there a DATE-function on colmn1? Is it a varchar? Please don't crosspost. The question should not be in the .NET forum. Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]
  • Stored Procedures SQL Server

    database question sql-server sysadmin
    8
    0 Votes
    8 Posts
    0 Views
    A
    I think 'Insert into' query will help you
  • Export data in SQL 2008

    css database question
    2
    0 Votes
    2 Posts
    0 Views
    Richard DeemingR
    Is there a carriage-return or line break embedded in the field? If you can isolate one of the affected rows, try dumping the characters from the affected field: DECLARE @FieldValue varchar(100); SELECT @FieldValue = AffectedField FROM AffectedTable WHERE Key = @AffectedKey; WITH E1(N) AS ( SELECT 1 UNION ALL SELECT 1 UNION ALL SELECT 1 UNION ALL SELECT 1 UNION ALL SELECT 1 UNION ALL SELECT 1 UNION ALL SELECT 1 UNION ALL SELECT 1 UNION ALL SELECT 1 UNION ALL SELECT 1 ), cteNumbers (N) As ( SELECT ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) FROM E1 a, E1 b -- Cross-join = 100 rows ) SELECT TOP(LEN(@FieldValue)) N, Ascii(Substring(@FieldValue, N, 1)) As AsciiCode, Substring(@FieldValue, N, 1) As Character FROM cteNumbers ORDER BY N ; You're looking for either a 10 or a 13 in the AsciiCode column. "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
  • bcp command in sql 2008

    question database help
    5
    0 Votes
    5 Posts
    0 Views
    N
    Sure, you can use xp_cmdshell to run a bcp command from a query window. You might have to first turn on the ability for SSMS to use a Windows command shell as it is usually off by default. If needed, run the following commands first: EXEC sp_configure 'show advanced options', 1 RECONFIGURE EXEC sp_configure 'xp_cmdshell', 1 RECONFIGURE Then run your xp_cmdshell using: EXEC xp_cmdshell '(your bcp command here)' If needed, turn back off the ability to use Windows command shell with: EXEC sp_configure 'xp_cmdshell', 0 RECONFIGURE EXEC sp_configure 'show advanced options', 0 RECONFIGURE -NP Never underestimate the creativity of the end-user.
  • 0 Votes
    3 Posts
    0 Views
    J
    Open a command window on the CLIENT machine - NOT the database machine. Verify that you have telnet. Run telnet use the following command. telnet 192.168.0.11 1234 There are two results to the above. First it succeeds which means it presents a blank screen (command window) or it returns an error message either quickly or after a couple of minutes. Note carefully unless the above succeeds NOTHING you do with a connection string will EVER succeed at working. If the above fails then you must look to something besides your application for a solution. Some POSSIBLE but not a complete list are the following - The database is not set up to accept remote connections. - The database is using a different port. - The host name\ip address is wrong. - there is a firewall that is preventing the connection. - There is no possible network path from the client machine to the database machine.
  • Inserting Master and DEtail Tables

    database help sql-server sysadmin algorithms
    13
    0 Votes
    13 Posts
    1 Views
    R
    Abdul, My questions here are: 1. Can I write logic in SSIS to update if the record already exists and certains columns are same, if so how can I do that. 2. If I incorporate logic into SSIS, can the performance be same as simple import process. Because the simple import process in SSIS uses the bulk insert mechanism with batch inserts of records. The answer to your question isn't as simple as you may think. In the first place, your use of the phrase "can I" adds to the problem because it seems that you are very much an SSIS novice. so let me approach this in anothe way. 1. An SSIS package can be created that would handle your problem. The trick is to use the MERGE statement that is available in T-SQL. You can also use a pair of SQL statements such as those that you provided in your most recent post. Howver, your SQL code may be impacting our performance somewhat because you are using the IN (SELECT....) instead of using the INNER JOIN approach to determining which rows to update. 2. A straight forward bulk load is always going to be the fastest choice; however, since you need to UPDATE some rows and INSERT others, that option isn't available to you,so there's no point in worrying about that. ;-) That being said, though, if this is your first SSIS package, I would suggest that you create a temp table into which you the INSERT both updated versions of the existing rows and then the new rows (with the IDENTITY INSERT ON, so that you can keep the IDs of the existing rows), and then truncate the existing table and reload it from the temp table. ;-)
  • 0 Votes
    6 Posts
    5 Views
    R
    I've spent some time looking into normalization and currently my tables should be in 3rd Normal Form. I also have my application talking to the remote SQL server via the Entity Framework, so I'm getting there. Thanks all for your suggestions, they were most helpful. Rick...
  • Keeping Production DB Up To Date

    database business collaboration tools help
    9
    0 Votes
    9 Posts
    0 Views
    J
    You are going to be doing structure and data changes to a production database on a weekly basis? And I can only suppose that there is other software that uses it which will also need to be updated. Certainly not something I would want to see. Better make sure that you have complete automated unit and system testing. And have a lot of time to dedicate to implementing the automated deployment and providing for a rollback for ALL systems. I doubt you will find a tool that does it all. And every database change will need to be evaluated for rollback impact.
  • SSDT Install fail

    help visual-studio csharp database sql-server
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • myisam or innodb? how would you decide?

    csharp mysql com question announcement
    4
    0 Votes
    4 Posts
    0 Views
    L
    Neither, I would start by doing a proper review and analysis of the requirements and then decide which database system would have the features and power to support it. And for a hospital system I doubt that anything less than Oracle or SQL server would be sufficient. It is never a good idea to design your system so that it fits your choice of database and development language. Use the best guess