Re: mdb-schema for MsSql/sybase
Igor Korot <[email protected]>
| Newsgroups | gmane.comp.db.mdb-tools.devel |
|---|---|
| Message-ID | <32249485.1165883829143.JavaMail.root@elwamui-mouette.atl.sa.earthlink.net> |
Karl, Take a look at the project named FreeTDS. This is what you need... Thank you. -----Original Message----- >From: Carl Karsten <[email protected]> >Sent: Nov 18, 2006 4:11 PM >To: [email protected] >Subject: [mdb-dev] mdb-schema for MsSql/sybase > > >Has anyone made any attempts to add support for MsSql? > >what I am really interested in is converting the RI into something that MySql >WorkBench or dbd4 from http://fabforce.com can read. so far the only thing that >has worked for me is dbd4 to MsSql. > >few comments: oracle and MsSql have the same syntax for "add constraint", so >this will work for both: > > switch (backend) { > case 1: /* oracle */ > text = g_strconcat("alter table ", bound[1], > " add constraint ", bound[3], "_", bound[1], > " foreign key (", bound[0], ")" > " references ", bound[3], "(", bound[2], ")", NULL); > break; > } > >but... backend is 1 for oracle, 0 for everthing else due to this code: > > 249 int backend = 0; /* Backends: 1=oracle */ > > 254 if (strncmp(mdb->backend_name,"oracle",6) == 0) { > 255 backend = 1; > >so I hacked in a case for sybase: > 256 } else if (strncmp(mdb->backend_name,"sybase",6) == 0) { > 257 backend = 2; > >Now for the tricky part: the RI needs Primary Key's defined, and that curretnly >isn't happening. > >Anyone have some code to detect/generate Primary Key defs? > > >Carl K > > >------------------------------------------------------------------------- >Take Surveys. Earn Cash. Influence the Future of IT >Join SourceForge.net's Techsay panel and you'll get the chance to share your >opinions on IT & business topics through brief surveys - and earn cash >http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >_______________________________________________ >mdbtools-dev mailing list >[email protected] >https://lists.sourceforge.net/lists/listinfo/mdbtools-dev ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV