date format problem
 (411 Views)
hiiiiii......i have mysql in which i have taken data type "datetime" which takes in this format "yyyy-mm-dd hh:mm:ss" and c# datatime datatype gives mm/dd/yyyy now plsss tell me hurrily that what should i do....its really urgent.....i have
used tostring("yyyy-mm-dd") but when i use it it looses its month portion...
|
transaction problem in mysql for update for each row of gridview
 (140 Views)
i am having a transaction related problem regarding mysql.. need some advice how to proceed !!!
here is a gridview for my application and i am inserting or updating for each row.... like
foreach(GridViewRowrowinGridPaymentSchedule.Rows)
{
if(row.RowType==DataControlRowType.DataRow)
{
if(payment.Update(PayDetails,0))
{
success=true;
}
}
}
if(success==true)
{
lblmsg.Text="PaymentScheduleDetailsUpdated";
ClearFields();
}
well now what i want is if any of the row update or insert failes ... it should revert all the changes that was already made into the database ... even a single row update .. into that perticular table ... the code which i have called forpayment.Update(PayDetails,
0) is :
public Boolean Update(ProjectPaymentForm Payment, int flag)
{
MySqlConnection con = new MySqlConnection(Connection.GetConnectionString());
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
try
{
using (MySqlCommand cmd = new MySqlCommand("UPDATE payment_schedule_details SET"
+ " actual_date = ActualDate,"
+ " actual_amount = ActualAmount,"
+ " reason_for_delay = ReasonForDelay where payment_schedule_id=PayScheduleId" +
" and milestone_desc=MileStone", con))
{
//cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("PaymentScheduleID", Payment.ScheduleId);
cmd.Parameters.AddWithValue("ActualDate", (Payment.ActualDate.ToString("yyyy-MM-dd") == null DBNull.Value.ToString() : Payment.ActualDate.ToString("yyyy-MM-dd")));
cmd.Parameters.AddWithValue("ActualAmount", (Payment.ActualAmount == null 0 : Payment.ActualAmount));
cmd.Parameters.AddWithValue("ReasonForDelay", Payment.ReasonForDelay);
cmd.Parameters.AddWithValue("PayScheduleId", Payment.ScheduleId);
cmd.Parameters.AddWithValue("MileStone", Payment.ProjectMileStone);
cmd.Parameters.AddWithValue("flag", flag);
if (cmd.ExecuteNonQuery() > 0)
{
con.Close();
return true;
}
}
}
catch (MySqlException ex)
{
throw ex;
}
return true;
}
can someone help me out how to proceed in this scenario how do i undo each of the updates made into the table payment schedule details ...
|
problem connecting to mysql database
 (172 Views)
I'm new to ASP.net and I'm trying to connect to a mysql database but I'm getting this error when I'm running my application. Access denied for user 'test_mysql'@'localhost' (using password: YES). I used thistutorial to get this far ( http://www.15seconds.com/issue/050210.htm
) but I don't know how to fix this.
|
MySQL connection problem
 (155 Views)
I m using visual studio 2010 and i downloaded mySQL connector /net 6.3 (latest one). But when i try to connect mySQL Server it says "there is no support prior to 5.0". I think our mySQL server is version 4.0. How can i connect it
|
Connection problem while Uploading Large amount of data
 (150 Views)
Hi ,
I have developed a Asp.net application which uploads data from Excell Sheet and then Inserts those data after doing several Checks to the Mysql data base.
The Issue which Iam facing is that when Iam uplading lage amount of data at a time say around that 10000, the application crashes and gives the Unable to Open connection to server Error.The same app works well 1000-2000 data.
Iam using Loop to upload data to the server.
Is ther any Issue with my apporach or Issue with Mysql server,
I need to Uplaad very large amout of data at a time(aprox: 100000)
Please help me out.
Thank you
|
Query problem
 (103 Views)
I have a query like the one below which is working fine. But now I would like to add some specific rows from table1. How do I do that in a proper way
My original query:
SELECT a.* FROM table1 a INNER JOIN table2 b ON a.itemID=b.itemID
In addition I would now also like to include these rows into the selection
SELECT * FROM table1 WHERE somecolumn='111'
|
problem with ORACLE Cursors
 (172 Views)
It is working perfectly .if first select statement return 5 rows finally we are getting 5 tables..
But same i tried in ORACLE ..But i am not get the result .. May be i am wrong with cursors ..
I am finding the pb ..here cursors are not conistent ..but i declared only 3 cursors ..May be this one is the pb ..
please any body help my pb..
|
problem in convert from Sql Server to Oracle
 (99 Views)
,
Greetings, I convert this funcation from Sql Server to Oracle there no error in compilation but it does not work as I want and i think the reason related to options are in the following
the code for funcation in Sql Server is:-
================================
USE [HIODB]
GO
/****** Object: UserDefinedFunction [dbo].[AraSoundex] Script Date: 08/10/2009 16:37:56 ******/
SET GO
SET
GO
ALTER
ANSI_NULLS
ON QUOTED_IDENTIFIER
ON function [dbo].[AraSoundex](@araname
varchar(20))
returns varchar(20)
begin
DECLARE
@res VARCHAR(20)
DECLARE
DECLARE
DECLARE
@LetterLength integer @i
integer @result
VARCHAR(20)
SET
@LetterLength=0
SET
@i=1
SET
@result =
''
IF @araname is
not null
BEGIN
SET @LetterLength =
len(@araname)
WHILE @i
|
ODBC connection problem with oracle
 (201 Views)
I am using oledb connection class to connect oracle database,
i provided username,password and provider,but it's showing this error
ERROR [08001] [Microsoft][ODBC driver for Oracle][Oracle]ORA-12154: TNS:could not resolve the connect identifier specified
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
ERROR [01000] [Microsoft][ODBC Driver Manager] The driver doesn't support the version of ODBC behavior that the application requested (see SQLSetEnvAttr).
my connection string is
Provider=MSDAORA;user id=scott;pwd=tiger;data source=tnsentry;
Please suggest me how i can connect through oledb to oracle.
|
Godaddy.com and MySql.Data.dll problems.
 (165 Views)
I posted this on the 'Hosting Open Forums', but didn't get any answer so I'll try again here...
I have a .NET 2.0 application that is hosted on Godaddy.com. When you setup your MySQL database, Godaddy supplies you with several connection strings, depending on the connector you wish to use (ODBC, OLEDB, and MySQL Connector .NET).
Since they provide a connection string for Connector .NET, I assume this means I could use this connector to access MySQL, and from what I read, doing so would be preferable to using ODBC or OLEDB.
I setup my page and plopped the MySql.Data.dll into my bin directory as suggested. Since Godaddy sets the trust level to medium on shared hosts, I got the following error (I've seen many people bring up this problem due to running under a medium trust level
in .NET 2.0):
System.Security.SecurityException: That assembly does not allow partially trusted callers.
So, I did some research and it was suggested that if you add [assembly:owPartiallyTrustedCallers] to AssemblyInfo.cs in the MySql Connector .NET source, recompile, then use the new .dll, the trust issue will be resolved.
I did this and placed the new .dll in my /bin folder and although the original error went away, I now get the following error:
MySql.Data.MySqlClient.MySqlException: Unable to connect to any of the specified MySQL hosts ---> System.Security.SecurityException: Request for the permission of type 'System.Net.SocketPermission,
System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed
For what it's worth, I am able to get the ODBC connector working (but intermittently 'lose connection during query' somewhat rarely, but enough to be a problem), but would prefer using the Connector .NET to access MySQL database. Anybody experience this
and know what is going on, or how to fix this Is using the MySQL Connector .NET just not possible with Godaddy.com
|
oracle connection string problem
 (204 Views)
Hi
given below line Is aconnection string for my developmetn machine.
Now i have published the site on my server , so how to give to give oracle data base machine (IPaddress or Machine Name ) in connection string
ok bye
anup Phansa
|
mysql, C# and vwd 2008 connection problem
 (166 Views)
I have tried for weeks to get this right but am unable to do so ..
1) I downloaded Mysql connector 5.2.2. and Visual Web developer 2008
I added the necessary code changes to web.config and placed the Mysql.dll file in .Net directory. I added the reference to it in my project.
I also added the necessary code to machine.config as well, to handle the Mysql stuff...
I went into the administrator for ASP.NET and selected Mysql for the DB ...
I cannot see the DB in the database explorer.
Why cant i see it It only gives me options for ODBC, SQL SERVER, etc .. but not MySQL.
I require this to make it easier for me to access the DB and output data.
Also, can one show me how to
1)physically connect to the mysql DB in C#
2) Run an SQL statement in C# and output the results in a table/grid/form when the user clicks on a button(using visual web developer)
3) Assign variables to the result of an SQL statement.. Eg select user_name, user_password from users
String g_user_name = user_name
String g_user_password = user_password
Please, your help will be really apprecaited. I have tried fortoo long with0 success ...
|
problems with join statements...
 (110 Views)
I'm trying to use join statements on 3 tables.. and I've never done more than 2 at a time before.. can someone help me
OK, first table:
recipes:
recpID
name
instructions
preptime
cooktime
calories
fat
sfat
protein
carbs
fiber
sodium
meal
userID
and then:
ingredients:
ingID
ingredientand:ing2rec:
recpID
ingID
amount
measurement
and finally:users
userID
name
loginname
loginpass
email
active
and what I'm trying to do is search on a variety of things.. linking all the tables together.. The first sql statment I tried was this:SELECT
recipes.*, users.*, ingredients.*, ing2rec.recpID , ing2rec.ingID FROM (ing2rec LEFT JOIN recipes ON (ing2rec.recpID = recipes.recpID)) LEFT JOIN ingredients ON (ing2rec.ingID = ingredients.ingID) LEFT JOIN users ON (users.userID = recipes.userID) WHERE ((recipes.meal
= 'Breakfast'))It returned records, but most of them were just duplicates of the recipe records.. then I tried this:SELECT
recipes.*, users.*, ingredients.*, ing2rec.recpID , ing2rec.ingID FROM (recipes LEFT JOIN recipes ON (ing2rec.recpID = recipes.recpID)) LEFT JOIN ingredients ON (ing2rec.ingID = ingredients.ingID) LEFT JOIN users ON (users.userID = recipes.userID) WHERE ((recipes.meal
= 'Breakfast'))
System.Data.Odbc.OdbcException: ERROR [HYT00] Not unique table/alias: 'recipes' at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode) at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method,
Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod) at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader) at System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior behavior) at
System.Data.Odbc.OdbcCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables,
Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataTable
dataTable) basically I need to search on the user table, userID, recipes with multiple fields, and then ingredients by ingredient..
how do I create the join statement
if it helps, here is the C# code I'm using via a query statment and AJAX:
string mySQL = "SELECT recipes.*, users.*, ingredients.*, ing2rec.recpID , ing2rec.ingID ";
mySQL += "FROM (recipes ";
mySQL += "LEFT JOIN recipes ON (ing2rec.recpID = recipes.recpID)) ";
mySQL += "LEFT JOIN ingredients ON (ing2rec.ingID = ingredients.ingID) ";
mySQL += "LEFT JOIN users ON (users.userID = recipes.userID) WHERE (";
string tempSQL = mySQL;
if (Request.QueryString["type"] != "") { mySQL += "(recipes.meal = '" + Request.QueryString["type"] + "') AND "; }
if (Request.QueryString["ingredient"] != "") { mySQL += "(ingredients.ingredient = '" + Request.QueryString["ingredient"] + "') AND "; }
if (Request.QueryString["sbphase"] != "") { mySQL += "(recipes.phase = '" + Request.QueryString["sbphase"] + "') AND "; }
if (Request.QueryString["cals"] != "") { mySQL += "(recipes.calories
|
I have a grouping problem
 (100 Views)
When i use the following sql:
select t2.teklif, t2.tarih, t1.ihlkodu, t1.ihlaltktgkodu, t1.kuladi from ihale_katilimcilar t1, ihale_hareket t2, ihale_katilinanihaledetay t3
where t1.id_iliski=t3.id and t2.id_iliski=t3.id and t1.ihlkodu=145 and t1.ihlaltktgkodu=135
group by t2.teklif, t2.tarih, t1.ihlkodu,t1.ihlaltktgkodu, t1.kuladi
The result i get is:
1100YTL 12.02.2008 16:08:16 145 135 KE.ES JKL ***
1200YTL 12.02.2008 16:03:16 145 135 KE.ES JKL
1400YTL 12.02.2008 14:35:07 145 135 KEM.ESM ASD ***
1500 YTL 12.02.2008 14:34:30 145 135 KEM.ESM ASD
The one i wantto get is the rows of the max date in each group:
1100YTL 12.02.2008 16:08:16 145 135 KE.ES JKL ***
1400YTL 12.02.2008 14:35:07 145 135 KEM.ESM ASD ***
Here is the script of tables:
-- Create table
create table IHALE_SIRKET
(
SRKTKODU NUMBER not null,
AD VARCHAR2(30) not null,
ADRES VARCHAR2(50),
TEL1 VARCHAR2(15),
TEL2 VARCHAR2(15),
FAX VARCHAR2(15),
EMAIL VARCHAR2(20),
KARALISTE NUMBER default -1,
AKTIF NUMBER(1) default -1,
SICILNO VARCHAR2(20) not null,
VERGINO VARCHAR2(20) not null,
TICSICILGAZSAYI VARCHAR2(10) not null,
TICSICILGAZTARIH DATE not null,
ODASICILNO VARCHAR2(20),
TESCILTARIHI DATE,
SERMAYE VARCHAR2(20),
DERECE NUMBER(2),
ODAKAYITTARIHI DATE,
KULLANICIADI VARCHAR2(15)
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create/Recreate primary, unique and foreign key constraints
alter table IHALE_SIRKET
add constraint CONSTRAINT_SRKTKODUPK primary key (SRKTKODU);
-- Create/Recreate indexes
create unique index IHALE_SIRKET_SRKTKODU on IHALE_SIRKET (SRKTKODU)
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-----------------------------------------------------
-- Create table
create table IHALE_KATILIMCILAR
(
KULADI VARCHAR2(20),
SONUC NUMBER(1),
AKTIF NUMBER(1) default 1,
SRKTKODU VARCHAR2(10) not null,
SONBULUNMAZAMANI DATE default sysdate,
SIRA NUMBER(1) default 0,
EKSURETALEP VARCHAR2(50),
ID NUMBER(6) not null,
IHLKODU NUMBER not null,
IHLALTKTGKODU VARCHAR2(10) not null,
ID_ILISKI NUMBER
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create/Recreate primary, unique and foreign key constraints
alter table IHALE_KATILIMCILAR
add constraint CONSTRAINT_IHLKTLMIDPK primary key (ID)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
--------------------------------------------------------------
-- Create table
create table IHALE_KATILIMCILAR
(
KULADI VARCHAR2(20),
SONUC NUMBER(1),
AKTIF NUMBER(1) default 1,
SRKTKODU VARCHAR2(10) not null,
SONBULUNMAZAMANI DATE default sysdate,
SIRA NUMBER(1) default 0,
EKSURETALEP VARCHAR2(50),
ID NUMBER(6) not null,
IHLKODU NUMBER not null,
IHLALTKTGKODU VARCHAR2(10) not null,
ID_ILISKI NUMBER
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create/Recreate primary, unique and foreign key constraints
alter table IHALE_KATILIMCILAR
add constraint CONSTRAINT_IHLKTLMIDPK primary key (ID)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
Here is the content of those tables:
prompt Loading IHALE_HAREKET...
insert into IHALE_HAREKET (ID_ILISKI, TEKLIF, TARIH, ID)
values (189, '1400YTL', to_date('12-02-2008 14:35:07', 'dd-mm-yyyy hh24:mi:ss'), 1);
insert into IHALE_HAREKET (ID_ILISKI, TEKLIF, TARIH, ID)
values (203, '1200YTL', to_date('12-02-2008 16:03:16', 'dd-mm-yyyy hh24:mi:ss'), 2);
insert into IHALE_HAREKET (ID_ILISKI, TEKLIF, TARIH, ID)
values (203, '1100YTL', to_date('12-02-2008 16:03:16', 'dd-mm-yyyy hh24:mi:ss'), 3);
insert into IHALE_HAREKET (ID_ILISKI, TEKLIF, TARIH, ID)
values (189, '1500 YTL', to_date('12-02-2008 14:34:30', 'dd-mm-yyyy hh24:mi:ss'), 0);
prompt 4 records loaded
prompt Loading IHALE_KATILIMCILAR...
insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, EKSURETALEP, ID, IHLKODU, IHLALTKTGKODU, ID_ILISKI)
values (null, null, 0, '42', to_date('12-02-2008 13:33:32', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 63, 141, '134', 191);
insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, EKSURETALEP, ID, IHLKODU, IHLALTKTGKODU, ID_ILISKI)
values (null, null, 0, '46', to_date('12-02-2008 13:33:32', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 64, 141, '134', 192);
insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, EKSURETALEP, ID, IHLKODU, IHLALTKTGKODU, ID_ILISKI)
values ('KEM.ESM', null, 1, '44', to_date('12-02-2008 11:00:41', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 61, 145, '135', 189);
insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, EKSURETALEP, ID, IHLKODU, IHLALTKTGKODU, ID_ILISKI)
values (null, null, 0, '45', to_date('12-02-2008 13:33:42', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 69, 141, '133', 197);
insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, EKSURETALEP, ID, IHLKODU, IHLALTKTGKODU, ID_ILISKI)
values (null, null, 0, '42', to_date('12-02-2008 13:33:36', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 65, 141, '132', 193);
insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, EKSURETALEP, ID, IHLKODU, IHLALTKTGKODU, ID_ILISKI)
values (null, null, 0, '45', to_date('12-02-2008 13:33:36', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 66, 141, '132', 194);
insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, EKSURETALEP, ID, IHLKODU, IHLALTKTGKODU, ID_ILISKI)
values (null, null, 0, '46', to_date('12-02-2008 13:33:36', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 67, 141, '132', 195);
insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, EKSURETALEP, ID, IHLKODU, IHLALTKTGKODU, ID_ILISKI)
values (null, null, 0, '42', to_date('12-02-2008 13:33:42', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 68, 141, '133', 196);
insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, EKSURETALEP, ID, IHLKODU, IHLALTKTGKODU, ID_ILISKI)
values (null, null, 0, '44', to_date('12-02-2008 13:34:23', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 70, 142, '252', 198);
insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, EKSURETALEP, ID, IHLKODU, IHLALTKTGKODU, ID_ILISKI)
values (null, null, 0, '45', to_date('12-02-2008 13:34:23', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 71, 142, '252', 199);
insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, EKSURETALEP, ID, IHLKODU, IHLALTKTGKODU, ID_ILISKI)
values (null, null, 0, '44', to_date('12-02-2008 13:34:40', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 72, 143, '253', 200);
insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, EKSURETALEP, ID, IHLKODU, IHLALTKTGKODU, ID_ILISKI)
values (null, null, 0, '46', to_date('12-02-2008 13:34:40', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 73, 143, '253', 201);
insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, EKSURETALEP, ID, IHLKODU, IHLALTKTGKODU, ID_ILISKI)
values (null, null, 0, '45', to_date('12-02-2008 11:00:38', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 60, 145, '136', 188);
insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, EKSURETALEP, ID, IHLKODU, IHLALTKTGKODU, ID_ILISKI)
values (null, null, 0, '44', to_date('12-02-2008 15:59:21', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 74, 145, '136', 202);
insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, EKSURETALEP, ID, IHLKODU, IHLALTKTGKODU, ID_ILISKI)
values ('KE.ES', null, 1, '45', to_date('12-02-2008 15:59:25', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 75, 145, '135', 203);
commit;
prompt 15 records loaded
prompt Loading IHALE_SIRKET...
insert into IHALE_SIRKET (SRKTKODU, AD, ADRES, TEL1, TEL2, FAX, EMAIL, KARALISTE, AKTIF, SICILNO, VERGINO, TICSICILGAZSAYI, TICSICILGAZTARIH, ODASICILNO, TESCILTARIHI, SERMAYE, DERECE, ODAKAYITTARIHI, KULLANICIADI)
values (42, 'KEMMM', 'asddd', '03123456444', '03123456444', '03123456444', 'kemmm@yahoo.com', 0, 1, '325999444', '234999444', '34599944', to_date('04-02-2008', 'dd-mm-yyyy'), '23/29444', to_date('04-02-2008', 'dd-mm-yyyy'), '4.000.000.11YTL', 1, to_date('04-02-2008',
'dd-mm-yyyy'), null);
insert into IHALE_SIRKET (SRKTKODU, AD, ADRES, TEL1, TEL2, FAX, EMAIL, KARALISTE, AKTIF, SICILNO, VERGINO, TICSICILGAZSAYI, TICSICILGAZTARIH, ODASICILNO, TESCILTARIHI, SERMAYE, DERECE, ODAKAYITTARIHI, KULLANICIADI)
values (46, 'MLK', 'fgh', '456', '456', '456', 'k6k@yahoo.com', 0, 1, '2346', '2346', '2346', to_date('27-01-2008', 'dd-mm-yyyy'), '2346', to_date('25-01-2008', 'dd-mm-yyyy'), '2346', 1, to_date('22-01-2008', 'dd-mm-yyyy'), null);
insert into IHALE_SIRKET (SRKTKODU, AD, ADRES, TEL1, TEL2, FAX, EMAIL, KARALISTE, AKTIF, SICILNO, VERGINO, TICSICILGAZSAYI, TICSICILGAZTARIH, ODASICILNO, TESCILTARIHI, SERMAYE, DERECE, ODAKAYITTARIHI, KULLANICIADI)
values (44, 'ASD', 'asd', '123', '123', '123', 'h@yahoo.com', 0, 1, '123', '123', '123', to_date('10-01-2008', 'dd-mm-yyyy'), '123', to_date('17-01-2008', 'dd-mm-yyyy'), '123', 1, to_date('11-01-2008', 'dd-mm-yyyy'), 'KEM.ESM');
insert into IHALE_SIRKET (SRKTKODU, AD, ADRES, TEL1, TEL2, FAX, EMAIL, KARALISTE, AKTIF, SICILNO, VERGINO, TICSICILGAZSAYI, TICSICILGAZTARIH, ODASICILNO, TESCILTARIHI, SERMAYE, DERECE, ODAKAYITTARIHI, KULLANICIADI)
values (45, 'JKL', 'jkl', '234', '234', '345', 'kk@yahoo.com', 0, 1, '234', '234', '234', to_date('04-01-2008', 'dd-mm-yyyy'), '234', to_date('27-01-2008', 'dd-mm-yyyy'), '234', 2, to_date('19-01-2008', 'dd-mm-yyyy'), 'KE.ES');
|
PostgreSQL-problem with query
 (100 Views)
I am newbie. I want use query : SELECT public.Master.ID, public.Master.Description from Master , but
->Error missing table Master
.If use query : SELECT "public"."Master"."ID", "public"."Master"."Description" from "Master"
It is OK.
How to use query : SELECT public.Master.ID, public.Master.Description from Master
Help me please.
Thank you very much
|
problem with provider name
 (140 Views)
Hi Everybody!
I am using Oracle 9i as backendand Microsoft .Net framework 2.0.I am using Microsoft .NET Framework data provider for Oracle with System.Data.OracleClient namespace.
Code:
string connection = System.Configuration.ConfigurationManager.AppSettings["dbConnection"].ToString();
OracleConnection conn =
new OracleConnection("connection");
Could you please tell me what is the provider name I would appreciate your help.
|
MySQL update problem
 (129 Views)
Hi i'm trying to update my MySQL Database and i've tried 3 methods and it did work.
Here are the codes..
1st Method - Using the object datasets - connected via ODBC
AkuDataTableAdapters.announcementTableAdapter
announceAdapter = new AkuDataTableAdapters.announcementTableAdapter();
announceAdapter.UpdateAnnouncement(DateTime.Now, Server.HtmlEncode(FreeTextBox1.Text), announceID);
2nd Method - Using ODBC connecter
String akudetaConnectionString
= "Dsn=akudetaDB;database=akudeta;description=Located at web host;option=0;port=0;server=server; uid=pass";
using (OdbcConnection con = new OdbcConnection(akudetaConnectionString))
using (OdbcCommand cmd = new OdbcCommand("UPDATE announcement SET Message = WHERE AnnounceNo =", con))
{
cmd.Parameters.Add("@Message", OdbcType.VarChar, 2000).Value = Server.HtmlEncode(FreeTextBox1.Text);
cmd.Parameters.Add("@AnnounceNo", OdbcType.Int).Value = announceID;
con.Open();
cmd.ExecuteNonQuery();
}
3rd method using .Net Connector
String ConnString = " Database=akudeta;Data Source=akudeta.com;";
ConnString += " User Id=akudetadb; Password=pass";
using (MySqlConnection con2 = new MySqlConnection(ConnString))
using (MySqlCommand cmd2 = new MySqlCommand("UPDATE announcement SET Message =Message WHERE AnnounceNo =AnnounceNo", con2))
{
cmd2.Parameters.Add("Message", MySqlDbType.VarChar, 2000).Value = Server.HtmlEncode(FreeTextBox1.Text);
cmd2.Parameters.Add("AnnounceNo", MySqlDbType.Int32).Value = announceID;
con2.Open();
cmd2.ExecuteNonQuery();
}
Apparently there are no errors when i put these codes in a try-catch method but my database is not updated.
|
Procedure problem
 (116 Views)
If I can call the procedure from the command promt doing
call sp_AuthorizeUser('MyUserName', 'MyPassword')
but when calling it from the code I get
"You have asyntax error in your SQL statement"
what is wrong then!
|
longtext problem (asp vs mysql)
 (209 Views)
dear all:
I got a problem.I have 2 computer, them bothhad install "visual web developer 2005 express edittion2"
And something strange happen. The computer had win2k system counldn't get longtext field from the mysql
when I running aspx-fileright the IE borwser.
But the other one had win xp system could got it back ,and working well.
It's bug me,and make me confuse .
How should I fix this problem help me please !
And thanks a lot.
There're error message below:
[OdbcException (0x80131937)]
System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode) +35
System.Data.Odbc.OdbcDataReader.GetData(Int32 i, SQL_C sqlctype, Int32 cb, Int32& cbActualOut) +164
System.Data.Odbc.OdbcDataReader.internalGetString(Int32 i) +88
System.Data.Odbc.OdbcDataReader.GetValue(Int32 i, TypeMap typemap) +69
System.Data.Odbc.OdbcDataReader.internalGetValue(Int32 i) +137
System.Data.Odbc.OdbcDataReader.GetValues() +28
System.Data.Odbc.OdbcDataReader.Read() +284
.....
.... and so on....
|
|