Click here to Skip to main content
15,917,618 members
Home / Discussions / C#
   

C#

 
GeneralRe: Could you please... Pin
Christian Graus22-Aug-05 18:23
protectorChristian Graus22-Aug-05 18:23 
QuestionHow to pass variables through URL in CGI Pin
Handy Su22-Aug-05 10:51
Handy Su22-Aug-05 10:51 
AnswerRe: How to pass variables through URL in CGI Pin
Handy Su22-Aug-05 10:58
Handy Su22-Aug-05 10:58 
GeneralCalling a function from Intel Library using C# Pin
E6AD22-Aug-05 10:11
E6AD22-Aug-05 10:11 
GeneralRe: Calling a function from Intel Library using C# Pin
Judah Gabriel Himango22-Aug-05 10:49
sponsorJudah Gabriel Himango22-Aug-05 10:49 
GeneralRe: Calling a function from Intel Library using C# Pin
E6AD22-Aug-05 12:21
E6AD22-Aug-05 12:21 
GeneralRe: Calling a function from Intel Library using C# Pin
Judah Gabriel Himango22-Aug-05 17:03
sponsorJudah Gabriel Himango22-Aug-05 17:03 
Generalc# controls Pin
xilefxilef22-Aug-05 8:37
xilefxilef22-Aug-05 8:37 
GeneralRe: c# controls Pin
Insincere Dave22-Aug-05 12:48
Insincere Dave22-Aug-05 12:48 
GeneralTags in treeview Pin
Soviet22-Aug-05 7:57
Soviet22-Aug-05 7:57 
GeneralRe: Tags in treeview Pin
Robert Rohde22-Aug-05 8:27
Robert Rohde22-Aug-05 8:27 
GeneralC# xml serializer Pin
ppp00122-Aug-05 7:48
ppp00122-Aug-05 7:48 
GeneralRe: C# xml serializer Pin
Robert Rohde22-Aug-05 8:35
Robert Rohde22-Aug-05 8:35 
GeneralRe: C# xml serializer Pin
ppp00122-Aug-05 8:46
ppp00122-Aug-05 8:46 
GeneralRe: C# xml serializer Pin
Robert Rohde23-Aug-05 8:52
Robert Rohde23-Aug-05 8:52 
GeneralMMC Snap Ins Pin
Mridang Agarwalla22-Aug-05 7:44
Mridang Agarwalla22-Aug-05 7:44 
GeneralRe: MMC Snap Ins Pin
Robert Rohde22-Aug-05 8:37
Robert Rohde22-Aug-05 8:37 
GeneralAssembly Language and C# Pin
Mridang Agarwalla22-Aug-05 7:31
Mridang Agarwalla22-Aug-05 7:31 
GeneralRe: Assembly Language and C# Pin
Daniel Turini22-Aug-05 8:06
Daniel Turini22-Aug-05 8:06 
GeneralRe: Assembly Language and C# Pin
leppie22-Aug-05 23:56
leppie22-Aug-05 23:56 
GeneralODBC: SqlGetDiagRec - help needed Pin
Shahrazad22-Aug-05 7:31
sussShahrazad22-Aug-05 7:31 
Hi,

As a beginning C# programmer I have some trouble getting this ODBC function to work.

<br />
// the declaration:<br />
[DllImport("odbc32.dll",CharSet=CharSet.Ansi)]<br />
private static extern short SQLGetDiagRec( <br />
    short HandleType, <br />
    IntPtr inputHandle, <br />
    ushort RecNumber, <br />
    string SqlState, <br />
    short NativeError, <br />
    String MessageText, <br />
    short bufferLength, <br />
    short TextLength );<br />
<br />
<br />
<br />
//the call<br />
<br />
String messageText = string.Empty;<br />
short messageTextlen = 128;<br />
short nativeErr = 0;<br />
string sqlState = " ";<br />
short rc = SQLGetDiagRec(<br />
    SQL_HANDLE_ENV, <br />
    m_environmentHandle, <br />
    1, <br />
    sqlState, <br />
    nativeErr, <br />
    messageText, <br />
    messageTextlen, <br />
    128);<br />



Whatever I do, after all ODBC calls I make, sqlState will always show spaces and messagetext will always be an empty string

I guess I'm doing something wrong here, but can't begin to wonder what.
Is the declaration with DLLImport of this function not correct, is there something wrong with the parameters when the function is called ? Should I use pointers maybe (I thought in C# that was no longer necessary)

I hope some of the guru's can get me going on this Sigh | :sigh:

Thanks,
Shah Rose | [Rose]
GeneralRe: ODBC: SqlGetDiagRec - help needed Pin
Shahrazad22-Aug-05 23:40
sussShahrazad22-Aug-05 23:40 
GeneralWMI Pin
Mridang Agarwalla22-Aug-05 7:24
Mridang Agarwalla22-Aug-05 7:24 
GeneralRe: WMI Pin
Daniel Turini22-Aug-05 8:06
Daniel Turini22-Aug-05 8:06 
GeneralRe: WMI Pin
leppie23-Aug-05 0:03
leppie23-Aug-05 0:03 

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.