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
  • ADO and VC++. Which approach?

    c++ com help question
    2
    0 Votes
    2 Posts
    13 Views
    C
    I suggest doing #1, but use the Visual C++ extensions for ADO to avoid the BSTR stuff. A small sample can be found here: www.gl.umbc.edu/~bcorfm1/software.html
  • WITH ENCRYPTION

    database sql-server sysadmin security question
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • 0 Votes
    1 Posts
    8 Views
    No one has replied
  • Creating Database Programmitically - Urgent plz

    database c++ sql-server sysadmin
    2
    0 Votes
    2 Posts
    16 Views
    L
    try to use ADOX object. you will find solution.
  • ADO and OLE DB provider

    c++ database com tutorial question
    1
    0 Votes
    1 Posts
    6 Views
    No one has replied
  • ADO Parameters

    database tutorial question
    2
    0 Votes
    2 Posts
    15 Views
    L
    what I know is you can difine a string variable as shown below dim SqlSt as string dim Db as ADODB.Connection db= new ADODB.connection Sqlst ="INSERT INTO TABLE1, Name VARCHAR(10),Surname, VARCHAR(1)" db.execute slqst
  • cannot use _RecordsetPtr when importing msado15.dl

    question tutorial
    2
    0 Votes
    2 Posts
    13 Views
    R
    Well i've been using _RecordsetPtr as a member in header files. I had a quick look at one of my sources and this is everything that I include, so it's probably in one of these. Good luck, Robert Dickenson. /* #include "stdafx.h" // stdafx only includes the following two: */ #include #include #import "C:\Program Files\Common Files\System\ADO\msado15.dll" \ no_namespace rename("EOF", "EndOfFile") #include #include #include
  • real ****er of an SQL query

    database help sharepoint question
    3
    0 Votes
    3 Posts
    15 Views
    L
    Did you tried to use a temporary table or recursion? I am sorry that I cannot offer you more details since I don't know the specifics, but here is how I'd wrote it: (1) Recursion. This assumes that your region table cannot find a loop (from a region parent you cannot get back to the same region parent). Anyway, if this happens, select into a temporary table all the regions you can find starting with a parent, eliminate duplicates and you'll get a table containing the parent region candidates (either our passed ID or an ancestor), and also you can create another temporary table with all the details you need joining the #parents with #products (or @productID, if only a product interests you). Create Procedure sp_ProductRegionalDetails @productID int, @regionID int As Declare @lRetVal int /* return status: 0 - success (found), 1 - fail(not found), negative value (error) */ /* Try to get the details for product, of from parent etc. */ Select @lRetVal = 1 /* assume not found */ Declare @fExitLoop Bit Select @fExitLoop = 0 Declare @LoopProductID int Declare @LoopRegionID int Select @LoopProductID = @productID, @LoopRegionID = @regionID While (@fExitLoop = 0) Begin Select [... Product regional details ...] From [... Tables, Joins ...] Where ProductIdField = @LoopProductID And RegionIdField = @LoopRegionID And And [... additional conditions, etc ...] If \[The field interesting for me are retrieved\] Begin Select @fExitLoop = 1 Select @lRetVal = 0 /\* found \*/ End Else Begin Select @LoopRegionID = Exec sp\_ParentRegion @LoopRegionID If @LoopRegionID Is Null Begin Select @fExitLoop = 1 /\* no parent, exit loop \*/ End End End Return @lRetVal (2) Temporary tables. Create Procedure sp_ProductRegionalDetails @productID int, @regionID int As Declare @lRetVal int /* return status: 0 - success (found), 1 - fail(not found), negative value (error) */ /* Try to get the details for product, of from parent etc. */ Select @lRetVal = 1 /* assume not found */ [Create a temporary table containing all regions] -- Create Table #regions (regionID int, ToSelect bit default(0) ) - for example [Populate this table from our starting point: @regionID - the table will be populated in the natural order, i.e. starts with our regionID, if will find something then return, if not advance to the next paren
  • how to make select fast use ODBC

    database json performance tutorial
    8
    0 Votes
    8 Posts
    56 Views
    B
    But today I use SQL Server open the same .dbf(conver to .mdb),the SQL Server can not locate the last record in time.But VFP locate the last record in a few seconds.Somebody tell me than VFP use a special technology ,such as RUSHMORE..... Who can tell me how about RUSHMORE?What is the relationship with the SQL?:-O hi
  • What is wrong???

    question com help
    2
    0 Votes
    2 Posts
    20 Views
    M
    Hi Bob, i have done the following and it works: _ConnectionPtr pConnection = NULL ; pConnection.CreateInstance(__uuidof(Connection)); _RecordsetPtr pRec = NULL ; pRec.CreateInstance(__uuidof(Recordset)); _bstr_t strConn2("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\\Northwind.mdb") ; pConnection->Open(strConn2,"","",NULL); pRec->Open("SELECT * FROM [Text;Database=c:\\Temp;HDR=YES;FMT=Delimited].[1.txt]", pConnection.GetInterfacePtr(), adOpenStatic, adLockReadOnly, adCmdText); int nCount = pRec->GetRecordCount(); The data: "Praefix";"Trennung" "acco";5 "asso";5 "comm";5 "comp";5 "conc";5 "conf";5
  • ADO Parameters

    database tutorial question
    1
    0 Votes
    1 Posts
    9 Views
    No one has replied
  • SQL Server Logs

    database sql-server sysadmin
    1
    0 Votes
    1 Posts
    11 Views
    No one has replied
  • Unable to initialize DAO/Jet db engine

    help database c++ question announcement
    1
    0 Votes
    1 Posts
    13 Views
    No one has replied
  • Microsoft OLE DB access to Oracle Database

    database oracle wpf com tutorial
    3
    0 Votes
    3 Posts
    27 Views
    C
    Thanks, Tomasz. I happened to miss that little gem. And it certainly helps answer a lot of questions. :) Chris
  • querry execution takes too long

    database sql-server sysadmin help
    3
    0 Votes
    3 Posts
    24 Views
    A
    Depending on your settings in the analyzer, queries can tak a lot longer than when running from a normal client... Maybe the server needs more memory/cpu maybe the disks are too slow maybe the server have way too much other work to do It's a hard question to answar without knowing a lot about the system... - Anders Money talks, but all mine ever says is "Goodbye!"
  • SQL Server Filegroups

    database sql-server sysadmin question
    2
    0 Votes
    2 Posts
    19 Views
    J
    This is because the table and primary key (or clustered index) have to be on the same filegroup. You can create a table on the MM32TABLES group and then create a non-clustered index on MM32INDEXES. Jason Cono, MCSD
  • Data converting from access to excel

    question help
    1
    0 Votes
    1 Posts
    10 Views
    No one has replied
  • 0 Votes
    1 Posts
    9 Views
    No one has replied
  • 0 Votes
    1 Posts
    12 Views
    No one has replied
  • DBCC

    question database sql-server sysadmin career
    1
    0 Votes
    1 Posts
    10 Views
    No one has replied