1 --- libgda-1.9.100/providers/freetds/gda-freetds-message.c.orig 2003-01-16 01:10:30.000000000 +0100
2 +++ libgda-1.9.100/providers/freetds/gda-freetds-message.c 2005-10-20 11:20:09.000000000 +0200
6 *gda_freetds_message_new (GdaConnection *cnc,
9 const gboolean is_err_msg)
11 GdaFreeTDSConnectionData *tds_cnc;
13 g_return_val_if_fail (message != NULL, NULL);
15 message->is_err_msg = is_err_msg;
16 - memcpy ((void *) &message->msg, (void *) info, sizeof (TDSMSGINFO));
17 + memcpy ((void *) &message->msg, (void *) info, sizeof (TDSMESSAGE));
18 if (info->server != NULL)
19 message->msg.server = g_strdup (info->server);
20 if (info->message != NULL)
24 gda_freetds_message_add (GdaConnection *cnc,
27 const gboolean is_err_msg)
29 GdaFreeTDSMessage *msg = NULL;
30 --- libgda-1.9.100/providers/freetds/gda-freetds-message.h.orig 2003-01-16 01:10:30.000000000 +0100
31 +++ libgda-1.9.100/providers/freetds/gda-freetds-message.h 2005-10-20 11:20:21.000000000 +0200
33 struct _GdaFreeTDSMessage {
40 GdaFreeTDSMessage *gda_freetds_message_new (GdaConnection *cnc,
43 const gboolean is_err_msg);
44 GdaFreeTDSMessage *gda_freetds_message_add (GdaConnection *cnc,
47 const gboolean is_err_msg);
48 void gda_freetds_message_free (GdaFreeTDSMessage *message);
50 --- libgda-1.9.100/providers/freetds/gda-freetds-provider.c.orig 2005-09-22 12:24:01.000000000 +0200
51 +++ libgda-1.9.100/providers/freetds/gda-freetds-provider.c 2005-10-20 11:33:03.000000000 +0200
53 #if defined(HAVE_FREETDS_VER0_6X) || defined(HAVE_FREETDS_VER0_60)
54 static int gda_freetds_provider_tds_handle_info_msg (TDSCONTEXT *,
58 static int gda_freetds_provider_tds_handle_err_msg (TDSCONTEXT *,
63 static int gda_freetds_provider_tds_handle_info_msg (void *aStruct);
64 static int gda_freetds_provider_tds_handle_err_msg (void *aStruct);
67 if (tds_cnc->config) {
68 #ifdef HAVE_FREETDS_VER0_6X
69 - tds_free_connect (tds_cnc->config);
70 + tds_free_connection (tds_cnc->config);
72 tds_free_config(tds_cnc->config);
75 GdaParameterList *params)
77 GdaDataModel *model = NULL;
80 GdaValueType gda_type;
81 GdaValue *value = NULL;
85 /* there should not be any result tokens */
86 #ifdef HAVE_FREETDS_VER0_6X
87 - while ((tds_cnc->rc = tds_process_result_tokens (tds_cnc->tds, &tds_cnc->result_type))
88 + while ((tds_cnc->rc = tds_process_result_tokens (tds_cnc->tds, &tds_cnc->result_type, NULL))
90 while ((tds_cnc->rc = tds_process_result_tokens (tds_cnc->tds))
93 const gboolean is_err_msg)
95 TDSSOCKET *tds = (TDSSOCKET *) aStruct;
96 - TDSMSGINFO *msg_info = (TDSMSGINFO *) bStruct;
97 + TDSMESSAGE *msg_info = (TDSMESSAGE *) bStruct;
98 GdaConnection *cnc = NULL;
99 GdaFreeTDSConnectionData *tds_cnc = NULL;
100 GdaConnectionEvent *error = NULL;
101 @@ -1093,7 +1093,7 @@
102 /* FIXME: rewrite tds_handle_message as well/use new parameters here */
104 gda_freetds_provider_tds_handle_info_msg (TDSCONTEXT *ctx, TDSSOCKET *tds,
108 return gda_freetds_provider_tds_handle_message ((void *) tds,
109 #ifdef HAVE_FREETDS_VER0_6X
110 @@ -1115,7 +1115,7 @@
111 /* FIXME: rewrite tds_handle_message as well/use new parameters here */
113 gda_freetds_provider_tds_handle_err_msg (TDSCONTEXT *ctx, TDSSOCKET *tds,
117 return gda_freetds_provider_tds_handle_message ((void *) tds,
118 #ifdef HAVE_FREETDS_VER0_6X
119 --- libgda-1.9.100/providers/freetds/gda-freetds-provider.h.orig 2003-09-17 13:05:03.000000000 +0200
120 +++ libgda-1.9.100/providers/freetds/gda-freetds-provider.h 2005-10-20 11:29:54.000000000 +0200
123 TDSSOCKET *tds; /* connection handle */
124 #ifdef HAVE_FREETDS_VER0_6X
125 - TDSCONNECTINFO *config; /* tds connect struct */
126 + TDSCONNECTION *config; /* tds connect struct */
128 TDSCONFIGINFO *config; /* tds config struct */
130 --- libgda-1.9.100/providers/freetds/gda-freetds-recordset.c.orig 2005-09-22 12:24:01.000000000 +0200
131 +++ libgda-1.9.100/providers/freetds/gda-freetds-recordset.c 2005-10-20 11:30:46.000000000 +0200
133 /* Private utility functions */
136 -static TDSCOLINFO *gda_freetds_dup_tdscolinfo (TDSCOLINFO *col);
137 +static TDSCOLUMN *gda_freetds_dup_tdscolinfo (TDSCOLUMN *col);
138 static GdaRow *gda_freetds_get_current_row(GdaFreeTDSRecordset *recset);
143 if (recset->priv->columns) {
144 while (recset->priv->columns->len > 0) {
145 - TDSCOLINFO *col = (TDSCOLINFO *) g_ptr_array_index (recset->priv->columns, 0);
146 + TDSCOLUMN *col = (TDSCOLUMN *) g_ptr_array_index (recset->priv->columns, 0);
152 for (i = 0; i < recset->priv->res->num_cols; i++) {
157 field = gda_row_get_value (row, i);
158 col = recset->priv->res->columns[i];
159 @@ -216,16 +216,16 @@
164 -gda_freetds_dup_tdscolinfo (TDSCOLINFO *col)
166 +gda_freetds_dup_tdscolinfo (TDSCOLUMN *col)
168 - TDSCOLINFO *copy = NULL;
169 + TDSCOLUMN *copy = NULL;
171 g_return_val_if_fail (col != NULL, NULL);
173 - copy = g_new0(TDSCOLINFO, 1);
174 + copy = g_new0(TDSCOLUMN, 1);
176 - memcpy(copy, col, sizeof(TDSCOLINFO));
177 + memcpy(copy, col, sizeof(TDSCOLUMN));
179 /* set pointers to NULL */
180 copy->column_nullbind = NULL;
182 gda_freetds_recordset_describe_column (GdaDataModel *model, gint col)
184 GdaFreeTDSRecordset *recset = (GdaFreeTDSRecordset *) model;
185 - TDSCOLINFO *colinfo = NULL;
186 + TDSCOLUMN *colinfo = NULL;
191 g_return_if_fail (recset->priv->columns != NULL);
192 g_return_if_fail (col < recset->priv->columns->len);
194 - colinfo = (TDSCOLINFO *) g_ptr_array_index (recset->priv->columns, col);
195 + colinfo = (TDSCOLUMN *) g_ptr_array_index (recset->priv->columns, col);
196 g_return_if_fail (colinfo);
198 attribs = gda_data_model_describe_column (model, col);
201 GdaFreeTDSConnectionData *tds_cnc = NULL;
202 GdaFreeTDSRecordset *recset = NULL;
203 - TDSCOLINFO *col = NULL;
204 + TDSCOLUMN *col = NULL;
206 GdaConnectionEvent *error = NULL;
207 gboolean columns_set = FALSE;
210 #ifdef HAVE_FREETDS_VER0_6X
211 while ((tds_cnc->rc = tds_process_result_tokens (tds_cnc->tds,
212 - &tds_cnc->result_type))
213 + &tds_cnc->result_type, NULL))
215 if (tds_cnc->result_type == TDS_ROW_RESULT) {
216 gint row_type, compute_id;
217 --- libgda-1.9.100/providers/freetds/gda-freetds-types.c.orig 2005-09-16 11:55:02.000000000 +0200
218 +++ libgda-1.9.100/providers/freetds/gda-freetds-types.c 2005-10-20 11:31:00.000000000 +0200
221 gda_freetds_set_gdavalue_by_datetime (GdaValue *field,
230 gda_freetds_set_gdavalue_by_datetime4 (GdaValue *field,
241 -gda_freetds_get_value_type (TDSCOLINFO *col)
242 +gda_freetds_get_value_type (TDSCOLUMN *col)
244 g_return_val_if_fail (col != NULL, GDA_VALUE_TYPE_UNKNOWN);
250 -gda_freetds_set_gdavalue (GdaValue *field, gchar *val, TDSCOLINFO *col,
251 +gda_freetds_set_gdavalue (GdaValue *field, gchar *val, TDSCOLUMN *col,
252 GdaFreeTDSConnectionData *tds_cnc)
254 const TDS_INT max_size = 255;
255 --- libgda-1.9.100/providers/freetds/gda-freetds-types.h.orig 2003-01-16 01:10:30.000000000 +0100
256 +++ libgda-1.9.100/providers/freetds/gda-freetds-types.h 2005-10-20 11:31:11.000000000 +0200
261 -void gda_freetds_set_gdavalue (GdaValue *field, gchar *val, TDSCOLINFO *col,
262 +void gda_freetds_set_gdavalue (GdaValue *field, gchar *val, TDSCOLUMN *col,
263 GdaFreeTDSConnectionData *tds_cnc);
264 -const GdaValueType gda_freetds_get_value_type (TDSCOLINFO *col);
265 +const GdaValueType gda_freetds_get_value_type (TDSCOLUMN *col);