Storing CRichedit Filedata in Sql Srv Table (Column)

Storing CRichedit Filedata in Sql Srv Table (Column)

Post by Steffen Pelzette » Fri, 18 May 2001 21:19:48


I try to save the RTF- file data from CRichEditCtrl in a column of a sql-
server table.
To Stream the data into the field I use StreamOut- Funktion.
I've problems to find the correct field variable for the sql- table column.
At first I'd tried vbinary, it does'nt work.
Now I use ntext, but if I want to AddNew () I get an errormessage that I can
only open the recordset for readings - even if I use the CRecordset::none
If you know that problem or have an idear, please help me.

Thanks Steffen.


1. ??? Calling stored procedures, VB4 and SQL Srv 6

I want to do the following from VB4 via SQL Server 6:

        -- create a temporary stored procedure on the server,
                something like this:

        S$ = "CREATE PROCEDURE ##TempGetCounts

                FROM Table1, Table2
                WHERE Table1.Column1 = Table2.Column1"


        -- set an rdoPreparedStatement on the stored procedure:

        S$ = "{ call ##TempGetCounts (?, ?) }"        
        Set PrepStmt = RemoteConn.CreatePreparedStmt("GetCts", S$)

        PrepStmt.rdoParameters(0).Direction = rdParamOutput

        I GET NO FURTHER THAN THIS, because an invalid object error
        occurs, since there are no rdoParameter objects in the
        rdoParameters collection ( PrepStmt.rdoParameters.Count = 0 )

        I left out the last line but both PrepStmt.Execute, and
        PrepStmt.OpenResultset gave errors about no parameters.

        I put 'exec' in place of 'call' and it complained syntax, so the
        prepared statement IS validated when it's created, but I cant
        setup the parameters (there aren't any in the collection).

        WHAT IS MISSING???? (The stored proc IS created on the server)

        Help is greatly appreciated...


    Software Developer   |   www:

2. Quality Control Charting OCX

3. D2, MS SQL SRV, Temporary tables - Do you have the answer

4. Database Naming Convention's

5. Stored Proc: Updating a column with a column from the same table

6. approve awKtwN unsubscribe

7. Install SQL 6.5 Srv Pck 3 for SQL 6.5 Workstation

8. Connection attempt fails in thread

9. Win 2k Adv Srv, SQL 2k Std Edt and SQL SP1 on cluster

10. SQL-Mail problem (SQL-Srv. 6.5)

11. alternate column names or column size through sql-create-table

12. inserting multible columns from one table into a single column in another table

13. Selecting the first 6 columns of a table by column order/ column id