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
  • Relation multiple table using in C#

    csharp
    2
    0 Votes
    2 Posts
    0 Views
    P
    I think the mistake lies in your DataAdapter.Fill() function. As far as I know only overload for Fill() that accepts 2 arguments is Fill(DataTable, IDataReader) Have a look at this page for further clarification: http://msdn.microsoft.com/en-us/library/system.data.common.dataadapter.fill.aspx[^] Otherwise the rest of the code looks fine.
  • Fault Exception in WCF Services

    help question csharp wcf
    3
    0 Votes
    3 Posts
    0 Views
    P
    The thing is I went there before I came here. I want some meaty explanation(from practical experience) rather than the cut and dried documentation provided by Microsoft. PS:Seeing those huge tables and lists at the start of the page itself was a huge turnoff. :|
  • Sending data to database

    database csharp sql-server sysadmin question
    4
    0 Votes
    4 Posts
    0 Views
    P
    The thing is I am still new. Is it not good that we do more of the grunt work at the starting stages itself? And DAL coding is quite hectic. Sometimes I really feel why do we need it anyway. Thank you for eye opener atleast.
  • Trying to get a MySQL subquery to return multiple records

    mysql question
    2
    0 Votes
    2 Posts
    0 Views
    L
    Yup[^] :) Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^] They hate us for our freedom![^]
  • How to create reports effectively

    question csharp database business tools
    4
    0 Votes
    4 Posts
    0 Views
    F
    Thank you for your first replys. I got some ideas. But, of course, more replys are welcome :-)
  • sql server 2008 security

    database sql-server sysadmin security
    3
    0 Votes
    3 Posts
    0 Views
    J
    Best as I can tell from your question you are asking for something that is impossible. SQL Server normally installs as an application. Thus it is ALWAYS visible on the client machine. Now you could re-architect your application to use the embedded version of SQL Server (I think.) Then it would appear that only your application existed. I suspect this would require a bit of work. There are limitations to that approach. Note as well that this has nothing to do with security. Security means something completely different.
  • Stored procedure timeout

    database question sharepoint sql-server sysadmin
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • ADO.NET

    csharp database sql-server sysadmin
    3
    0 Votes
    3 Posts
    0 Views
    L
    M.T.H.Danish wrote: If any user want to insert another row in that table then it is not possible message should be display.... Please Just reply the Query & CODE.... A database does not display messages, it holds data. It holds data in bulk, not in "single records". What you want does not make much sense from a data-viewpoint. Now, this is not the place to "order" code like you do. The questions on the forums are answered by volunteers, in their free time. Put it in a object, serialize it, and stuff it in a single-column blob. Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^] They hate us for our freedom![^]
  • ADO.NET

    csharp database sql-server sysadmin
    2
    0 Votes
    2 Posts
    0 Views
    I
    M.T.H.Danish wrote: If any user want to insert another row in that table then it is not possible message should be display Take a look at locking a table: http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@Generic__BookTextView/55452[^] M.T.H.Danish wrote: Please Just reply the Query & CODE I didn't downvote you, but I think most people here won't like to do your work. You can ask questions, you can show your code and ask for help, but you have to do your work on your own. So my answer is: Definitely not! ------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.
  • exporting Table to Excel file by TSQL Problem

    database help sql-server com testing
    6
    0 Votes
    6 Posts
    0 Views
    L
    The JET-provider needs to be 64-bit too. Try downloading[^] the newer version. Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^] They hate us for our freedom![^]
  • 0 Votes
    2 Posts
    0 Views
    L
    rskuchimanchi wrote: it may not be properly installed. Is ADO installed? The 32 or the 64-bit version? rskuchimanchi wrote: VERY VERY URGENT.. No, it ain't. In fact, I'm gonna ignore the rest of the thread. Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^] They hate us for our freedom![^]
  • SQL Seconds to Day, Hour, Minute, Second

    database css
    5
    0 Votes
    5 Posts
    0 Views
    H
    try this : DECLARE @DurationSeconds INT DECLARE @DurationDays INT SET @DurationSeconds = 62110 SET @DurationDays = @DurationSeconds /86400 Select CASE WHEN @DurationDays > 0 THEN Convert(VarChar,@DurationDays)+ ':'+ Convert(VarChar, DateAdd(S, (@DurationSeconds-(@DurationDays*86400)),0), 108) ELSE Convert(VarChar, DateAdd(S, @DurationSeconds, 0), 108) END
  • Continuous absent query

    question database help
    3
    0 Votes
    3 Posts
    0 Views
    H
    WITH Dates ( EntryDate, EmployeeNumber, Status, Days, EmployeeCode, EmployeeName, DeptName, JobName, HOD, Supervisor ) AS ( SELECT a.[DATE], a.EmployeeID, a.Status, 1,a.EmployeeCode,a.EmployeeName,a.DeptName,a.JobName,a.HOD,a.Supervisor FROM tblEmployeeAttendance1 a WHERE a.\[Date\] between @StartDate and @EndDate and (a.status='AB' OR a.Status='O') AND datepart(dw,a.\[Date\]) NOT IN (1,7) -- RECURSIVE UNION ALL SELECT a.\[DATE\], a.EmployeeID, a.Status, CASE WHEN (a.Status = Parent.Status) THEN Parent.Days + 1 ELSE 1 END, a.EmployeeCode,a.EmployeeName,a.DeptName,a.JobName,a.HOD,a.Supervisor FROM tblEmployeeAttendance1 a INNER JOIN Dates parent ON datediff(day, a.\[DATE\], DateAdd(day, 1, parent.EntryDate)) = 0 AND a.EmployeeID = parent.EmployeeNumber where a.\[Date\] between @StartDate and @EndDate and (a.status='AB' OR a.Status='O') AND datepart(dw,a.\[Date\]) NOT IN (1,7) ) SELECT * FROM Dates where days>=2 order by EmployeeNumber, EntryDate I have added AND datepart(dw,a.[Date]) NOT IN (1,7), which will excludes weekly off days. this would work perfactly.
  • locking on select

    help question sharepoint discussion announcement
    19
    0 Votes
    19 Posts
    1 Views
    H
    One reason would be occurance of deadlock while executing the update query. deadlock occurs at that time you are trying to do multiple operation on the same table at the same time. e.g. select and update both operations are done on same table same time then deadlock will occurs. To avoid this situation use no lock in your select query and use update lock in your update query.
  • Error Running SP [SOLVED]

    sharepoint database help announcement
    6
    0 Votes
    6 Posts
    0 Views
    J
    Hi, I my Self solved the problem via this strategy Change the bellow code : if @ModuleSettings is not NULL BEGIN set @param = @param + '[ModuleSettings]=''' + @ModuleSettings + ''',' END **With :** if @ModuleSettings is not NULL BEGIN set @param = @param + '[ModuleSettings]=''' + replace (@ModuleSettings,CHAR(39),char(39)+CHAR(39)) + ''',' End conclusion : you should replace : @ModuleSettings with : replace (@ModuleSettings,CHAR(39),char(39)+CHAR(39))
  • 0 Votes
    2 Posts
    0 Views
    E
    problem solved. In my schema compare the options if "Ignore AnsiNulls" and "Ignore QuatedIdentifiers" where checked,so updated AnsiNulls and QuatedIdentifiers settings was not marked as needs to be updated during the schema compare. Also,I've set AnsiNulls and QuatedIdentifiers default settings to true in database.sqlsettings file.
  • Case statement in where clouse with date compare

    database help
    7
    0 Votes
    7 Posts
    0 Views
    D
    Thanx.. its working :-D
  • 0 Votes
    6 Posts
    0 Views
    H
    Row_number() function in combination with common table expression is the best way indeed In Word you can only store 2 bytes. That is why I use Writer.
  • First Day using Oracle 11.g

    database question sql-server oracle sysadmin
    9
    0 Votes
    9 Posts
    0 Views
    J
    I think it's 11 gigs, thus the name 11g. I'm going to 0/1 on the boolean, just use to it. I'll have to look up the backup feature, but it's 1 cpu 1 core, 1 gig, oh well it's free to use. I'm starting to like it, makes sense now. [Day3] I got the ODP client software working on the web server, the xcopy version. And the 11gXE working on the database server and tested the connection added SQL Explorer and EMS SQLServer, took about an hour to download, extract and run. My asp.net code is working using the ODP client, so far so good. I need to get my tables or my table file from my computer to the database server. In SQL Server 2008, I can just copy the files over and attach, is that possible on Oracle?
  • ADO broken in W7 SP1

    help c++ database sql-server com
    4
    0 Votes
    4 Posts
    0 Views
    L
    viaducting wrote: Please note that VB6 and .NET ADO interop are not supported anymore That's saying something about VB6 and ADO interop. Not a statement on the future of ADO. viaducting wrote: suggest to me that MS aren't expecting people to still be actively developing ADO-based projects. Second statement merely explains how a specific bug surprised the team. viaducting wrote: suggest to me that MS aren't expecting people to still be actively developing ADO-based projects. VB6 is deprecated, and yes, I imagine that they extend that to the combination of ADO and VB6. There is no official statement that ADO is being phased out. Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]