Microsoft sql server TSQL
ALTER TABLE TABLENAME ALTER COLUMN COLUMNNAME CHGDATATYPE
MYSQL TSQL
ALTER TABLE TABLENAME MODIFY COLUMNNAME CHGDATATYPE
For paradox and dbase we need to write the code as follows in delphi
unit autoincfld;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, BDE, DB, DBClient, DBTables, StdCtrls;
type
TChangeRec = packed record
szName: DBINAME; { field name }
iType: word; { field type }
iSubType: word; { field subtype }
iLength: word; { field length }
iPrecision: byte; { precision }
end;
type
TForm1 = class(TForm)
Table1: TTable;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
procedure ChangeField(Table: TTable; Field: TField; Rec: TChangeRec);
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
const
TheTableName = 'MY_TABLE.DB';
TheFieldName = 'MY_FIELD';
var
CR: TChangeRec;
begin
Table1.TableName := TheTableName;
Table1.Exclusive := True;
Table1.Open;
FillChar(CR, sizeof(CR), #0);
CR.iType := fldPDXAUTOINC;
ChangeField(Table1, Table1.FieldByName(TheFieldName), CR);
end;
procedure TForm1.ChangeField(Table: TTable; Field: TField; Rec: TChangeRec);
var
Props: CURProps;
hDb: hDBIDb;
TableDesc: CRTblDesc;
pFields: pFLDDesc;
pOp: pCROpType;
B: byte;
begin
// Initialize the pointers...
// pFields := nil; pOp := nil;
// Make sure the table is open exclusively so we can get the db handle...
if Table.Active = False then
raise EDatabaseError.Create('Table must be opened to restructure');
if Table.Exclusive = False then
raise EDatabaseError.Create('Table must be opened exclusively to
restructure');
Check(DbiSetProp(hDBIObj(Table.Handle), curxltMODE, integer(xltNONE)));
// Get the table properties to determine table type...
Check(DbiGetCursorProps(Table.Handle, Props));
// Make sure the table is either Paradox or dBASE...
if (Props.szTableType <> szPARADOX) and (Props.szTableType <> szDBASE)
then
raise EDatabaseError.Create('Field altering can only occur on Paradox' +
' or dBASE tables');
// Allocate memory for the field descriptor...
pFields := AllocMem(Table.FieldCount * sizeof(FLDDesc));
// Allocate memory for the operation descriptor...
pOp := AllocMem(Table.FieldCount * sizeof(CROpType));
try
// Set the pointer to the index in the operation descriptor to put
// crMODIFY (This means a modification to the record is going to
happen)...
Inc(pOp, Field.Index);
pOp^ := crMODIFY;
Dec(pOp, Field.Index);
// Fill the field descriptor with the existing field information...
Check(DbiGetFieldDescs(Table.Handle, pFields));
// Set the pointer to the index in the field descriptor to make the
// midifications to the field
Inc(pFields, Field.Index);
// If the szName portion of the ChangeRec has something in it, change
it...
if StrLen(Rec.szName) > 0 then
pFields^.szName := Rec.szName;
// If the iType portion of the ChangeRec has something in it, change
it...
if Rec.iType > 0 then
pFields^.iFldType := Rec.iType;
// If the iSubType portion of the ChangeRec has something in it, change
it...
if Rec.iSubType > 0 then
pFields^.iSubType := Rec.iSubType;
// If the iLength portion of the ChangeRec has something in it, change
it...
if Rec.iLength > 0 then
pFields^.iUnits1 := Rec.iLength;
// If the iPrecision portion of the ChangeRec has something in it,
change it...
if Rec.iPrecision > 0 then
pFields^.iUnits2 := Rec.iPrecision;
Dec(pFields, Field.Index);
for B := 1 to Table.FieldCount do begin
pFields^.iFldNum := B;
Inc(pFields, 1);
end;
Dec(pFields, Table.FieldCount);
// Blank out the structure...
FillChar(TableDesc, sizeof(TableDesc), 0);
// Get the database handle from the table's cursor handle...
Check(DbiGetObjFromObj(hDBIObj(Table.Handle), objDATABASE,
hDBIObj(hDb)));
// Put the table name in the table descriptor...
StrPCopy(TableDesc.szTblName, AnsiString(Table.TableName));
// Put the table type in the table descriptor...
StrPCopy(TableDesc.szTblType, Props.szTableType);
// The following three lines are necessary when doing any field
restructure
// operations on a table...
// Set the field count for the table
TableDesc.iFldCount := Table.FieldCount;
// Link the operation descriptor to the table descriptor...
TableDesc.pecrFldOp := pOp;
// Link the field descriptor to the table descriptor...
TableDesc.pFldDesc := pFields;
// Close the table so the restructure can complete...
Table.Close;
// Call DbiDoRestructure...
Check(DbiDoRestructure(hDb, 1, @TableDesc, nil, nil, nil, FALSE));
finally
if pFields <> nil then
FreeMem(pFields);
if pOp <> nil then
FreeMem(pOp);
end;
end;
end.
May 26, 2009
May 21, 2009
Eamcet 2009 key
At last in the evening Eamcet key is released.
Eamcet 2009 Initial key
Key also avilable on JNTU Website
Eamcet 2009 Initial key
Engineering papers |
engg_maths engg_physics engg_chemistry |
Medicine papers |
medicine_botany medicine_zoology medicine_physics medicine_chemistry |
Key also avilable on JNTU Website
May 13, 2009
Visakhapatnam Steel Plant(VSP) recruiting MT's
Hi vizag steel anounced MT Results below are the some of successful candidates list
List of successful external candidates in RINL/VSP MANAGEMENT TRAINEE (TECHNICAL) -
2009 written test held on 6th September 2009, for interview.
Sl.No Reg.No. Roll.No. Sl.No Reg.No. Roll.No.
1 1000010 3201050005 41 1008153 3401080273
2 1000093 3606080008 42 1008219 3301080143
3 1000149 3501080008 43 1008456 3201070902
4 1000393 3101080016 44 1008528 3301051116
5 1000528 3101030003 45 1008869 3101050460
6 1000631 3401040100 46 1008930 3301060349
7 1000898 3401080008 47 1009502 3402080069
8 1001304 3601030024 48 1009682 3501080166
9 1001400 3201070183 49 1009699 3501070349
10 1001631 3601070259 50 1009883 3601080162
........ and more members ..... follow below link
http://www.vizagsteel.com/code/tenders/jobdocs/9610mtt09results.pdf
all the best
Visakhapatnam Steel Plant(VSP), India’s first shore-based integrated Steel Plant, with an annual turnover of over Rs.10,000 crores invites applications from dynamic and result oriented engineers to join as Management Trainee(Technical) for a challenging career with excellent growth opportunities.
Number of posts : 138 (UR- 69, OBC- 49, SC- 16, ST- 4)
Four (4) posts out of the above are earmarked for Physically Challenged (PWD) [Partially Deaf – 2, Partially Blind – 1, Orthopaedically Handicapped (40 to 74% disability) – 1]
Disciplines:
Ceramics
Chemical
Civil
Computer Science / Information Technology
Electrical
Instrumentation
Mechanical / Production
Metallurgy
ELIGIBILITY :
Qualifications
Full-time regular Bachelor’s Degree in Engineering or Technology from a recognized Indian University / Institute in the disciplines of CERAMICS / CHEMICAL / CIVIL / COMPUTER SCIENCE/INFORMATION TECHNOLOGY / ELECTRICAL / INSTRUMENTATION / MECHANICAL/PRODUCTION / METALLURGY with minimum 60% of marks in the aggregate of all years / semesters (50% in aggregate for SC/ST candidates). For Computer Science / IT discipline, those having Master of Computer Applications (MCA) (full-time three years course) from a recognized Indian University / Institute with minimum 60% marks in the aggregate (50% marks in aggregate for SC/ST candidates) are also eligible.
Final year students:
Candidates appearing for their Final Year examination and expecting their results by 31st July, 2009 can also apply subject to passing the qualifying degree with specified percentage of marks at the time of interview. Candidates failing to produce the Provisional Certificate and Marks Sheet in original at the time of interview shall not be considered.
Age:
Born not earlier than April 1, 1984. Upper age limit is relaxable by 5 years for SC/ST, 3 years for OBC(non-creamy layer) and 10 years for PWD candidates. Those domiciled in the state of Jammu & Kashmir from 1/1/80 to 31/12/89 will be allowed 5 years relaxation in upper age limit.
Likely date for written test is 28th June, 2009 (Sunday).
EMOLUMENTS:
Selected candidates will be offered a basic pay of Rs.10750/- p.m. in the scale of Rs.10750-4%-16750 (E-1) with total emoluments of around Rs.25,000/-. On successful completion of training, they will be designated as Junior Managers in the same scale of pay(Pay scales are under upward revision from January 2007).
APPLICATION FEES: Rs 500
Starting date for online registration - 30th April, 2009.
Closing date for online registration - 20th May, 2009.
Last date for receipt of Registration Slip - 28th May, 2009.
more details :
http://www.vizagsteel.com/code/tenders/viewjobads.asp
http://www.vizagsteel.com/mtrecruitment09/advt.aspx
List of successful external candidates in RINL/VSP MANAGEMENT TRAINEE (TECHNICAL) -
2009 written test held on 6th September 2009, for interview.
Sl.No Reg.No. Roll.No. Sl.No Reg.No. Roll.No.
1 1000010 3201050005 41 1008153 3401080273
2 1000093 3606080008 42 1008219 3301080143
3 1000149 3501080008 43 1008456 3201070902
4 1000393 3101080016 44 1008528 3301051116
5 1000528 3101030003 45 1008869 3101050460
6 1000631 3401040100 46 1008930 3301060349
7 1000898 3401080008 47 1009502 3402080069
8 1001304 3601030024 48 1009682 3501080166
9 1001400 3201070183 49 1009699 3501070349
10 1001631 3601070259 50 1009883 3601080162
........ and more members ..... follow below link
http://www.vizagsteel.com/code/tenders/jobdocs/9610mtt09results.pdf
all the best
Visakhapatnam Steel Plant(VSP), India’s first shore-based integrated Steel Plant, with an annual turnover of over Rs.10,000 crores invites applications from dynamic and result oriented engineers to join as Management Trainee(Technical) for a challenging career with excellent growth opportunities.
Number of posts : 138 (UR- 69, OBC- 49, SC- 16, ST- 4)
Four (4) posts out of the above are earmarked for Physically Challenged (PWD) [Partially Deaf – 2, Partially Blind – 1, Orthopaedically Handicapped (40 to 74% disability) – 1]
Disciplines:
Ceramics
Chemical
Civil
Computer Science / Information Technology
Electrical
Instrumentation
Mechanical / Production
Metallurgy
ELIGIBILITY :
Qualifications
Full-time regular Bachelor’s Degree in Engineering or Technology from a recognized Indian University / Institute in the disciplines of CERAMICS / CHEMICAL / CIVIL / COMPUTER SCIENCE/INFORMATION TECHNOLOGY / ELECTRICAL / INSTRUMENTATION / MECHANICAL/PRODUCTION / METALLURGY with minimum 60% of marks in the aggregate of all years / semesters (50% in aggregate for SC/ST candidates). For Computer Science / IT discipline, those having Master of Computer Applications (MCA) (full-time three years course) from a recognized Indian University / Institute with minimum 60% marks in the aggregate (50% marks in aggregate for SC/ST candidates) are also eligible.
Final year students:
Candidates appearing for their Final Year examination and expecting their results by 31st July, 2009 can also apply subject to passing the qualifying degree with specified percentage of marks at the time of interview. Candidates failing to produce the Provisional Certificate and Marks Sheet in original at the time of interview shall not be considered.
Age:
Born not earlier than April 1, 1984. Upper age limit is relaxable by 5 years for SC/ST, 3 years for OBC(non-creamy layer) and 10 years for PWD candidates. Those domiciled in the state of Jammu & Kashmir from 1/1/80 to 31/12/89 will be allowed 5 years relaxation in upper age limit.
Likely date for written test is 28th June, 2009 (Sunday).
EMOLUMENTS:
Selected candidates will be offered a basic pay of Rs.10750/- p.m. in the scale of Rs.10750-4%-16750 (E-1) with total emoluments of around Rs.25,000/-. On successful completion of training, they will be designated as Junior Managers in the same scale of pay(Pay scales are under upward revision from January 2007).
APPLICATION FEES: Rs 500
Starting date for online registration - 30th April, 2009.
Closing date for online registration - 20th May, 2009.
Last date for receipt of Registration Slip - 28th May, 2009.
more details :
http://www.vizagsteel.com/code/tenders/viewjobads.asp
http://www.vizagsteel.com/mtrecruitment09/advt.aspx
Subscribe to:
Posts (Atom)