Click here to Skip to main content
15,914,416 members
Home / Discussions / Database
   

Database

 
QuestionRe: SQL Pin
Bravoone_200622-Dec-06 0:06
Bravoone_200622-Dec-06 0:06 
QuestionIDispatch error #3108 Pin
SL55521-Dec-06 21:20
SL55521-Dec-06 21:20 
AnswerRe: IDispatch error #3108 Pin
Pete O'Hanlon21-Dec-06 23:34
mvePete O'Hanlon21-Dec-06 23:34 
GeneralRe: IDispatch error #3108 Pin
SL55522-Dec-06 3:04
SL55522-Dec-06 3:04 
QuestionJDBC + MySQL Pin
NightFox50021-Dec-06 20:42
NightFox50021-Dec-06 20:42 
AnswerRe: JDBC + MySQL Pin
Colin Angus Mackay21-Dec-06 23:11
Colin Angus Mackay21-Dec-06 23:11 
AnswerRe: JDBC + MySQL Pin
Pete O'Hanlon22-Dec-06 2:00
mvePete O'Hanlon22-Dec-06 2:00 
QuestionCopying column with OLE Object datatype? Pin
kbalias21-Dec-06 18:36
kbalias21-Dec-06 18:36 
Hi
I want to copy records from one MS Access database to another MS Access database (the two databases have exactly the same structures and tables). I am using a C# windows application to control this. Overall I do not have any problems except in the one table. In the design view I see that the data type for one of the columns is OLE Object. I loaded the data from that table into a DataTable and checked what datatype that column has in C# and it said System.Byte[].

I did the following to see if there is data in the column (the column header is “olePoints”):

byte[] oleByte = (byte[]) row["olePoints"];<br />
foreach (byte b in oleByte)<br />
{<br />
Console.Write(b.ToString() + "  ")<br />
}


It seems fine. I try to write that row to the second MS Access database with the following code:

public static void InsertRecordTest(string destDbase, DataRow sourceRow)<br />
{<br />
    try<br />
    {<br />
        string sql = "INSERT INTO Table1 ( lId, nNumberOfPoints, olePoints )"<br />
+ " VALUES (" + (int)sourceRow["lId"] + ", " <br />
+ (short)sourceRow["nNumberOfPoints"] + ", "<br />
+ (byte[])sourceRow["olePoints"] + ");";<br />
<br />
        MSAccess_DAL.ModifyData(destDbase, sql);  /*calling my generic update method */<br />
    }<br />
    catch (Exception e)<br />
    {<br />
        throw (e);<br />
    }<br />
}

But it throws an exception with the following method:
Syntax error (missing operator) in query expression ‘System.Byte[]’.

Can anybody give me some ideas?

Thanks

Kobus
AnswerRe: Copying column with OLE Object datatype? Pin
Colin Angus Mackay21-Dec-06 23:10
Colin Angus Mackay21-Dec-06 23:10 
QuestionConnection Issue While connecting to SqlServer 2000 from ASP.NET 2.0 Pin
nesaraja21-Dec-06 18:29
nesaraja21-Dec-06 18:29 
AnswerRe: Connection Issue While connecting to SqlServer 2000 from ASP.NET 2.0 Pin
Colin Angus Mackay21-Dec-06 23:08
Colin Angus Mackay21-Dec-06 23:08 
QuestionDeleted row outside program problem. Pin
Tomy140221-Dec-06 15:43
Tomy140221-Dec-06 15:43 
AnswerRe: Deleted row outside program problem. Pin
Frank Kerrigan21-Dec-06 23:43
Frank Kerrigan21-Dec-06 23:43 
GeneralRe: Deleted row outside program problem. Pin
Tomy140222-Dec-06 15:21
Tomy140222-Dec-06 15:21 
QuestionHow do you quote parameters for an Oracle Select statement string when the parameter contains a quote? Pin
howardjr21-Dec-06 12:43
howardjr21-Dec-06 12:43 
AnswerRe: How do you quote parameters for an Oracle Select statement string when the parameter contains a quote? Pin
Colin Angus Mackay21-Dec-06 13:24
Colin Angus Mackay21-Dec-06 13:24 
GeneralRe: How do you quote parameters for an Oracle Select statement string when the parameter contains a quote? Pin
howardjr21-Dec-06 16:49
howardjr21-Dec-06 16:49 
GeneralRe: How do you quote parameters for an Oracle Select statement string when the parameter contains a quote? Pin
Mairaaj Khan21-Dec-06 21:17
professionalMairaaj Khan21-Dec-06 21:17 
GeneralRe: How do you quote parameters for an Oracle Select statement string when the parameter contains a quote? Pin
Colin Angus Mackay21-Dec-06 23:05
Colin Angus Mackay21-Dec-06 23:05 
GeneralRe: How do you quote parameters for an Oracle Select statement string when the parameter contains a quote? Pin
howardjr22-Dec-06 6:56
howardjr22-Dec-06 6:56 
GeneralRe: How do you quote parameters for an Oracle Select statement string when the parameter contains a quote? Pin
Colin Angus Mackay22-Dec-06 7:00
Colin Angus Mackay22-Dec-06 7:00 
GeneralRe: How do you quote parameters for an Oracle Select statement string when the parameter contains a quote? Pin
Paul Conrad22-Dec-06 7:24
professionalPaul Conrad22-Dec-06 7:24 
GeneralRe: How do you quote parameters for an Oracle Select statement string when the parameter contains a quote? Pin
Colin Angus Mackay22-Dec-06 8:03
Colin Angus Mackay22-Dec-06 8:03 
GeneralRe: How do you quote parameters for an Oracle Select statement string when the parameter contains a quote? Pin
howardjr23-Dec-06 19:43
howardjr23-Dec-06 19:43 
QuestionHow to trim fields on the table Sql Server 2000 ? Pin
kindman_nb21-Dec-06 11:34
kindman_nb21-Dec-06 11:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.